summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2012-10-05 17:38:23 -0700
committerJohn Southworth <john.southworth@vyatta.com>2012-10-05 17:38:23 -0700
commitbcd278807eed03ddd1427018d57ef21874988c3d (patch)
treed955549667beb4e1945dd174bffb262d1312c9f7 /scripts
parent814e86b744d47dc21dca5f078101fc9f6a315fe7 (diff)
downloadvyatta-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-xscripts/vyatta-first-login-passwd.sh10
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