From bcd278807eed03ddd1427018d57ef21874988c3d Mon Sep 17 00:00:00 2001 From: John Southworth Date: Fri, 5 Oct 2012 17:38:23 -0700 Subject: Bugfix 8410: give warning when config didn't load properly and passwords have been changed --- scripts/vyatta-first-login-passwd.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3