From b97e50cf7616276703e6c06d1aa0787d77dc3214 Mon Sep 17 00:00:00 2001 From: Miloslav Trmac Date: Mon, 27 Mar 2006 22:34:21 +0000 Subject: (failure, passed, warning, action): Make variables local, fixes running quotacheck after fsck has repaired something (#168118). --- rc.d/init.d/functions | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index ca29b07b..74fd3d05 100755 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -402,7 +402,7 @@ success() { # Log that something failed failure() { - rc=$? + local rc=$? #if [ -z "${IN_INITLOG:-}" ]; then # initlog $INITLOG_ARGS -n $0 -s "$1" -e 2 #fi @@ -414,7 +414,7 @@ failure() { # Log that something passed, but may have had errors. Useful for fsck passed() { - rc=$? + local rc=$? #if [ -z "${IN_INITLOG:-}" ]; then # initlog $INITLOG_ARGS -n $0 -s "$1" -e 1 #fi @@ -424,7 +424,7 @@ passed() { # Log a warning warning() { - rc=$? + local rc=$? #if [ -z "${IN_INITLOG:-}" ]; then # initlog $INITLOG_ARGS -n $0 -s "$1" -e 1 #fi @@ -434,6 +434,8 @@ warning() { # Run some action. Log its output. action() { + local STRING rc + STRING=$1 echo -n "$STRING " if [ "${RHGB_STARTED:-}" != "" -a -w /etc/rhgb/temp/rhgb-console ]; then -- cgit v1.2.1