summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/pr-conflicts.yml2
-rwxr-xr-xsrc/migration-scripts/openconnect/1-to-214
2 files changed, 8 insertions, 8 deletions
diff --git a/.github/workflows/pr-conflicts.yml b/.github/workflows/pr-conflicts.yml
index 72ff3969b..96040cd60 100644
--- a/.github/workflows/pr-conflicts.yml
+++ b/.github/workflows/pr-conflicts.yml
@@ -6,7 +6,7 @@ on:
jobs:
Conflict_Check:
name: 'Check PR status: conflicts and resolution'
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-22.04
steps:
- name: check if PRs are dirty
uses: eps1lon/actions-label-merge-conflict@releases/2.x
diff --git a/src/migration-scripts/openconnect/1-to-2 b/src/migration-scripts/openconnect/1-to-2
index 7031fb252..51cd6bc37 100755
--- a/src/migration-scripts/openconnect/1-to-2
+++ b/src/migration-scripts/openconnect/1-to-2
@@ -39,13 +39,13 @@ if not config.exists(cfg_base):
else:
if config.exists(cfg_base + ['authentication', 'mode']):
if config.return_value(cfg_base + ['authentication', 'mode']) == 'radius':
- # if "mode value radius", change to "tag node mode + valueless node radius"
- config.delete(cfg_base + ['authentication','mode', 'radius'])
- config.set(cfg_base + ['authentication', 'mode', 'radius'], value=None, replace=True)
- elif not config.exists(cfg_base + ['authentication', 'mode', 'local']):
- # if "mode local", change to "tag node mode + node local value password"
- config.delete(cfg_base + ['authentication', 'mode', 'local'])
- config.set(cfg_base + ['authentication', 'mode', 'local'], value='password', replace=True)
+ # if "mode value radius", change to "mode + valueless node radius"
+ config.delete_value(cfg_base + ['authentication','mode'], 'radius')
+ config.set(cfg_base + ['authentication', 'mode', 'radius'], value=None)
+ elif config.return_value(cfg_base + ['authentication', 'mode']) == 'local':
+ # if "mode local", change to "mode + node local value password"
+ config.delete_value(cfg_base + ['authentication', 'mode'], 'local')
+ config.set(cfg_base + ['authentication', 'mode', 'local'], value='password')
try:
with open(file_name, 'w') as f:
f.write(config.to_string())