diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/system-login.py | 6 | ||||
-rwxr-xr-x | src/migration-scripts/ipsec/10-to-11 | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/conf_mode/system-login.py b/src/conf_mode/system-login.py index 0a4a88bf8..d15fe399d 100755 --- a/src/conf_mode/system-login.py +++ b/src/conf_mode/system-login.py @@ -30,7 +30,7 @@ from vyos.defaults import directories from vyos.template import render from vyos.template import is_ipv4 from vyos.util import cmd -from vyos.util import call +from vyos.util import call, rc_cmd from vyos.util import run from vyos.util import DEVNULL from vyos.util import dict_search @@ -203,7 +203,9 @@ def generate(login): add_user_encrypt = " ".join(add_user_encrypt) call(f"/opt/vyatta/sbin/my_delete {del_user_plain}", env=env) - call(f"/opt/vyatta/sbin/my_set {add_user_encrypt}", env=env) + ret, out = rc_cmd(f"/opt/vyatta/sbin/my_set {add_user_encrypt}", env=env) + if ret: + raise ConfigError(out) else: try: if get_shadow_password(user) == dict_search('authentication.encrypted_password', user_config): diff --git a/src/migration-scripts/ipsec/10-to-11 b/src/migration-scripts/ipsec/10-to-11 index ec38d0034..0707a5e3c 100755 --- a/src/migration-scripts/ipsec/10-to-11 +++ b/src/migration-scripts/ipsec/10-to-11 @@ -14,8 +14,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import re - from sys import argv from sys import exit @@ -64,7 +62,7 @@ if config.exists(base + ['site-to-site', 'peer']): tmp = config.return_value(peer_base + ['local-address']) config.set(base + ['authentication', 'psk', peer, 'id'], value=tmp, replace=False) if config.exists(peer_base + ['remote-address']): - tmp = config.return_value(peer_base + ['remote-address']) + tmp = config.return_values(peer_base + ['remote-address']) if tmp: for remote_addr in tmp: if remote_addr == 'any': |