From f60022244e13f22d401d07f8d0212f56c836cd6d Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 1 Jul 2008 14:34:35 -0700 Subject: Can't use logger in standalone logger depends on syslogd which isn't running in standalone mode. So just format message directly to messages and auth.log --- scripts/standalone_root_pw_reset | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/standalone_root_pw_reset b/scripts/standalone_root_pw_reset index b76de6e9..b173f22d 100755 --- a/scripts/standalone_root_pw_reset +++ b/scripts/standalone_root_pw_reset @@ -79,7 +79,9 @@ sed -i \ -e "/^.* user root {/,/}/s/encrypted-password:.*\$/encrypted-password: \"$pw\"/" \ $CF -logger -s -p auth.notice "Root password reset to factory value" +echo $(date "+%b%e %T") $(hostname) "Root password reset to factory value" \ + | tee -a /var/log/auth.log >>/var/log/messages + sync echo "System will reboot in 10 seconds..." -- cgit v1.2.3