diff options
author | John Southworth <john.southworth@vyatta.com> | 2012-10-05 17:38:23 -0700 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2012-10-05 17:38:23 -0700 |
commit | bcd278807eed03ddd1427018d57ef21874988c3d (patch) | |
tree | d955549667beb4e1945dd174bffb262d1312c9f7 /scripts | |
parent | 814e86b744d47dc21dca5f078101fc9f6a315fe7 (diff) | |
download | vyatta-cfg-system-bcd278807eed03ddd1427018d57ef21874988c3d.tar.gz vyatta-cfg-system-bcd278807eed03ddd1427018d57ef21874988c3d.zip |
Bugfix 8410: give warning when config didn't load properly and passwords have been changed
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-first-login-passwd.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/vyatta-first-login-passwd.sh b/scripts/vyatta-first-login-passwd.sh index 11d4b85e..3c7a0995 100755 --- a/scripts/vyatta-first-login-passwd.sh +++ b/scripts/vyatta-first-login-passwd.sh @@ -17,6 +17,8 @@ if grep -q -e '^unionfs.*/filesystem.squashfs' /proc/mounts; then exit 0 fi +configdiff=$(cli-shell-api showConfig --show-cfg1 @ACTIVE --show-cfg2 /config/config.boot --show-context-diff) + API=/bin/cli-shell-api session_env=$($API getSessionEnv $PPID) @@ -113,7 +115,13 @@ done if $API sessionChanged; then commit - save + if [[ -z $configdiff ]] ; then + save + else + echo "Warning: potential configuration issues exist." + echo "User passwords have been updated but the configuration has not been saved." + echo "Please review and validate the running configuration before saving." + fi fi eval $(exit_configure) sudo touch /opt/vyatta/etc/.nofirstpasswd |