diff options
author | Indrajit Raychaudhuri <irc@indrajit.com> | 2023-12-24 23:42:51 -0600 |
---|---|---|
committer | Indrajit Raychaudhuri <irc@indrajit.com> | 2023-12-24 23:42:51 -0600 |
commit | 8331a573f1354940ec3744699dd88a3ca1323d7f (patch) | |
tree | 4211ce346c595153044e3a8a0ae5483f44704745 | |
parent | fb3a7e30bffc949584bbb0ad1f6632ef940605be (diff) | |
download | vyos-1x-8331a573f1354940ec3744699dd88a3ca1323d7f.tar.gz vyos-1x-8331a573f1354940ec3744699dd88a3ca1323d7f.zip |
ddclient: T5791: Adjust migration to normalize underscore in config names
-rwxr-xr-x | src/migration-scripts/dns-dynamic/2-to-3 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/migration-scripts/dns-dynamic/2-to-3 b/src/migration-scripts/dns-dynamic/2-to-3 index e5910f7b4..4e0aa37d5 100755 --- a/src/migration-scripts/dns-dynamic/2-to-3 +++ b/src/migration-scripts/dns-dynamic/2-to-3 @@ -37,7 +37,7 @@ def normalize_name(name): # Normalize unicode characters to ASCII (NFKD) # Replace all separators with hypens, strip leading and trailing hyphens name = normalize('NFKD', name).encode('ascii', 'ignore').decode() - name = re.sub(r'(\s|\W)+', '-', name).strip('-') + name = re.sub(r'(\s|_|\W)+', '-', name).strip('-') return name |