summaryrefslogtreecommitdiff
path: root/src/migration-scripts/system/14-to-15
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2020-09-25 11:49:30 -0500
committerJohn Estabrook <jestabro@vyos.io>2020-09-25 12:49:15 -0500
commite76d9a009632629e6a22b0d77eebc913c9268a6d (patch)
treed1fc5743ae884c522e47af083d55f10014c6951f /src/migration-scripts/system/14-to-15
parent4c818baa59046bdc5023abe8b63fa6f62611d115 (diff)
downloadvyos-1x-e76d9a009632629e6a22b0d77eebc913c9268a6d.tar.gz
vyos-1x-e76d9a009632629e6a22b0d77eebc913c9268a6d.zip
syslog: T2899: shift system migration files +1 to allow for crux
Diffstat (limited to 'src/migration-scripts/system/14-to-15')
-rwxr-xr-xsrc/migration-scripts/system/14-to-1521
1 files changed, 12 insertions, 9 deletions
diff --git a/src/migration-scripts/system/14-to-15 b/src/migration-scripts/system/14-to-15
index 2491e3d0d..c055dad1f 100755
--- a/src/migration-scripts/system/14-to-15
+++ b/src/migration-scripts/system/14-to-15
@@ -1,10 +1,14 @@
#!/usr/bin/env python3
#
-# Make 'system options reboot-on-panic' valueless
+# Delete 'system ipv6 blacklist' option as the IPv6 module can no longer be
+# blacklisted as it is required by e.g. WireGuard and thus will always be
+# loaded.
import os
import sys
+ipv6_blacklist_file = '/etc/modprobe.d/vyatta_blacklist_ipv6.conf'
+
from vyos.configtree import ConfigTree
if (len(sys.argv) < 1):
@@ -17,17 +21,16 @@ with open(file_name, 'r') as f:
config_file = f.read()
config = ConfigTree(config_file)
-base = ['system', 'options']
-if not config.exists(base):
+ip_base = ['system', 'ipv6']
+if not config.exists(ip_base):
# Nothing to do
sys.exit(0)
else:
- if config.exists(base + ['reboot-on-panic']):
- reboot = config.return_value(base + ['reboot-on-panic'])
- config.delete(base + ['reboot-on-panic'])
- # create new valueless node if action was true
- if reboot == "true":
- config.set(base + ['reboot-on-panic'])
+ # delete 'system ipv6 blacklist' node
+ if config.exists(ip_base + ['blacklist']):
+ config.delete(ip_base + ['blacklist'])
+ if os.path.isfile(ipv6_blacklist_file):
+ os.unlink(ipv6_blacklist_file)
try:
with open(file_name, 'w') as f: