summaryrefslogtreecommitdiff
path: root/src/migration-scripts/system
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-10-09 19:34:53 +0200
committerDaniil Baturin <daniil@baturin.org>2018-10-09 19:34:53 +0200
commitaf4186db5efb2c60308824d58ff310d22e96e76b (patch)
treef537eb7d7ed49b5f13915d4006ecaa76558cec93 /src/migration-scripts/system
parent9be759b8bb233c2da6d5a50ebc44f64918c76d8c (diff)
parent0d57cba02d6fe64ec9a1f3d6243a8de3bb925c4c (diff)
downloadvyos-1x-af4186db5efb2c60308824d58ff310d22e96e76b.tar.gz
vyos-1x-af4186db5efb2c60308824d58ff310d22e96e76b.zip
Merge branch 'crux' of github.com:vyos/vyos-1x into crux
Diffstat (limited to 'src/migration-scripts/system')
-rwxr-xr-xsrc/migration-scripts/system/8-to-912
1 files changed, 8 insertions, 4 deletions
diff --git a/src/migration-scripts/system/8-to-9 b/src/migration-scripts/system/8-to-9
index db3fefdea..cd92f3023 100755
--- a/src/migration-scripts/system/8-to-9
+++ b/src/migration-scripts/system/8-to-9
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
-# Deletes "system package" option as it is deprecated
+# Deletes the deprecated "system package" and "service telnet" options
import sys
@@ -17,12 +17,16 @@ with open(file_name, 'r') as f:
config = ConfigTree(config_file)
-if not config.exists(['system', 'package']):
+if (not config.exists(['system', 'package'])) and (not config.exists(['service', 'telnet'])):
# Nothing to do
sys.exit(0)
else:
- # Delete the node with the old syntax
- config.delete(['system', 'package'])
+ # Delete the "system package" subtree
+ if config.exists(['system', 'package']):
+ config.delete(['system', 'package'])
+
+ if config.exists(['service', 'telnet']):
+ config.delete(['service', 'telnet'])
try:
with open(file_name, 'w') as f: