From 76fe726e3530158ee175d34b9cb74209ccca2345 Mon Sep 17 00:00:00 2001 From: hagbard Date: Sun, 6 Jan 2019 16:04:52 -0800 Subject: Fix: T1162 - WireGuard: Unable to modify tunnels - KeyError: 'state' --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 7666cfd68..4cdedf9f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyos-1x (1.2.0-8) unstable; urgency=low + + * T1162: WireGuard: Unable to modify tunnels - KeyError: 'state' + + -- hagbard Sun, 06 Jan 2019 15:58:40 -0800 + vyos-1x (1.2.0-7) unstable; urgency=low * T1061: Wireguard: Missing option to administrativly shutdown interface -- cgit v1.2.3 From ac7c868dcba4dd6738eb0087c4f414b92bf10c9d Mon Sep 17 00:00:00 2001 From: hagbard Date: Mon, 7 Jan 2019 13:05:19 -0800 Subject: Fix: T1168 - Upgrade: 1,1,7 -> 1.2.0-epa2 (command conversion) --- debian/changelog | 7 +++++++ src/migration-scripts/ipsec/4-to-5 | 33 +++++++++++++++++++++++++++++++ src/migration-scripts/pppoe-server/0-to-1 | 4 +++- 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100755 src/migration-scripts/ipsec/4-to-5 (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4cdedf9f5..783080a92 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +vyos-1x (1.2.0-9) unstable; urgency=low + + * T1168: Upgrade: 1,1,7 -> 1.2.0-epa2 + - keyword change in config + + -- hagbard Mon, 07 Jan 2019 11:42:49 -0800 + vyos-1x (1.2.0-8) unstable; urgency=low * T1162: WireGuard: Unable to modify tunnels - KeyError: 'state' diff --git a/src/migration-scripts/ipsec/4-to-5 b/src/migration-scripts/ipsec/4-to-5 new file mode 100755 index 000000000..b64aa8462 --- /dev/null +++ b/src/migration-scripts/ipsec/4-to-5 @@ -0,0 +1,33 @@ +#!/usr/bin/env python3 + +# log-modes have changed, keyword all to any + +import sys + +from vyos.configtree import ConfigTree + +if (len(sys.argv) < 1): + print("Must specify file name!") + sys.exit(1) + +file_name = sys.argv[1] + +with open(file_name, 'r') as f: + config_file = f.read() + +ctree = ConfigTree(config_file) + +if not ctree.exists(['vpn', 'ipsec', 'logging','log-modes']): + # Nothing to do + sys.exit(0) +else: + lmodes = ctree.return_values(['vpn', 'ipsec', 'logging','log-modes']) + for mode in lmodes: + if mode == 'all': + ctree.set(['vpn', 'ipsec', 'logging','log-modes'], value='any', replace=True) + + try: + open(file_name,'w').write(ctree.to_string()) + except OSError as e: + print("Failed to save the modified config: {}".format(e)) + sys.exit(1) diff --git a/src/migration-scripts/pppoe-server/0-to-1 b/src/migration-scripts/pppoe-server/0-to-1 index df816a321..bb24211b6 100755 --- a/src/migration-scripts/pppoe-server/0-to-1 +++ b/src/migration-scripts/pppoe-server/0-to-1 @@ -1,6 +1,8 @@ #!/usr/bin/env python3 -# Delete "service ssh allow-root" option +# Convert "service pppoe-server authentication radius-server node key" +# to: +# "service pppoe-server authentication radius-server node secret" import sys -- cgit v1.2.3 From 632893abf5c7bf935d866462a107ed1eef1747b3 Mon Sep 17 00:00:00 2001 From: hagbard Date: Mon, 21 Jan 2019 12:55:32 -0800 Subject: Fix: T1178 - Scheduled script breaks ability to modify configuration --- debian/changelog | 6 ++++++ src/conf_mode/task_scheduler.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 783080a92..b8e9022c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyos-1x (1.2.0-10) unstable; urgency=low + + * T1178: Scheduled script breaks ability to modify configuration + + -- hagbard Mon, 21 Jan 2019 12:54:45 -0800 + vyos-1x (1.2.0-9) unstable; urgency=low * T1168: Upgrade: 1,1,7 -> 1.2.0-epa2 diff --git a/src/conf_mode/task_scheduler.py b/src/conf_mode/task_scheduler.py index 285afe2b5..0391d3edb 100755 --- a/src/conf_mode/task_scheduler.py +++ b/src/conf_mode/task_scheduler.py @@ -27,7 +27,7 @@ from vyos import ConfigError crontab_file = "/etc/cron.d/vyos-crontab" -def format_task(minute="*", hour="*", day="*", dayofweek="*", month="*", user="root", rawspec=None, command=""): +def format_task(minute="*", hour="*", day="*", dayofweek="*", month="*", user="vyos", rawspec=None, command=""): fmt_full = "{minute} {hour} {day} {month} {dayofweek} {user} {command}\n" fmt_raw = "{spec} {user} {command}\n" -- cgit v1.2.3 From 44dea640c6587a3599b427da9cdf79857fb4003a Mon Sep 17 00:00:00 2001 From: hagbard Date: Tue, 22 Jan 2019 10:33:19 -0800 Subject: Revert "Fix: T1178 - Scheduled script breaks ability to modify configuration" This reverts commit 632893abf5c7bf935d866462a107ed1eef1747b3. --- debian/changelog | 6 ------ src/conf_mode/task_scheduler.py | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b8e9022c0..783080a92 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,3 @@ -vyos-1x (1.2.0-10) unstable; urgency=low - - * T1178: Scheduled script breaks ability to modify configuration - - -- hagbard Mon, 21 Jan 2019 12:54:45 -0800 - vyos-1x (1.2.0-9) unstable; urgency=low * T1168: Upgrade: 1,1,7 -> 1.2.0-epa2 diff --git a/src/conf_mode/task_scheduler.py b/src/conf_mode/task_scheduler.py index 0391d3edb..285afe2b5 100755 --- a/src/conf_mode/task_scheduler.py +++ b/src/conf_mode/task_scheduler.py @@ -27,7 +27,7 @@ from vyos import ConfigError crontab_file = "/etc/cron.d/vyos-crontab" -def format_task(minute="*", hour="*", day="*", dayofweek="*", month="*", user="vyos", rawspec=None, command=""): +def format_task(minute="*", hour="*", day="*", dayofweek="*", month="*", user="root", rawspec=None, command=""): fmt_full = "{minute} {hour} {day} {month} {dayofweek} {user} {command}\n" fmt_raw = "{spec} {user} {command}\n" -- cgit v1.2.3 From 2ff09dbd66ee8196f985d1215f0e9bfb519efb12 Mon Sep 17 00:00:00 2001 From: hagbard Date: Wed, 23 Jan 2019 11:51:05 -0800 Subject: Fix: T1178: Scheduled script breaks ability to modify configuration --- debian/changelog | 6 ++++++ src/conf_mode/task_scheduler.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 783080a92..415cee0ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyos-1x (1.2.0-10) unstable; urgency=low + + * T1178: Scheduled script breaks ability to modify configuration + + -- hagbard Tue, 22 Jan 2019 13:35:09 -0800 + vyos-1x (1.2.0-9) unstable; urgency=low * T1168: Upgrade: 1,1,7 -> 1.2.0-epa2 diff --git a/src/conf_mode/task_scheduler.py b/src/conf_mode/task_scheduler.py index 285afe2b5..b171e9576 100755 --- a/src/conf_mode/task_scheduler.py +++ b/src/conf_mode/task_scheduler.py @@ -49,7 +49,7 @@ def make_command(executable, arguments): if arguments: return("sg vyattacfg \"{0} {1}\"".format(executable, arguments)) else: - return(executable) + return("sg vyattacfg \"{0}\"".format(executable)) def get_config(): conf = Config() -- cgit v1.2.3