summaryrefslogtreecommitdiff
path: root/src/migration-scripts/ntp
diff options
context:
space:
mode:
Diffstat (limited to 'src/migration-scripts/ntp')
-rwxr-xr-xsrc/migration-scripts/ntp/1-to-25
1 files changed, 5 insertions, 0 deletions
diff --git a/src/migration-scripts/ntp/1-to-2 b/src/migration-scripts/ntp/1-to-2
index 4a701e7e5..d1e510e4c 100755
--- a/src/migration-scripts/ntp/1-to-2
+++ b/src/migration-scripts/ntp/1-to-2
@@ -37,6 +37,11 @@ if not config.exists(base_path):
# Nothing to do
sys.exit(0)
+# config.copy does not recursively create a path, so create ['service'] if
+# it doesn't yet exist, such as for config.boot.default
+if not config.exists(['service']):
+ config.set(['service'])
+
# copy "system ntp" to "service ntp"
config.copy(base_path, new_base_path)
config.delete(base_path)