diff options
author | Tom Gundersen <teg@jklm.no> | 2011-04-30 21:30:29 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2011-04-30 21:30:29 +0200 |
commit | e98a352e9568ec31b33af8671987d026f1f73647 (patch) | |
tree | 0c6605baf7d16c565e6f908f7005838ad61c903c | |
parent | a43cb3c03ca768956ceb9e2856683eae5c48c68f (diff) | |
parent | 69b4aac9d13d3c4a6c4604cfb763033aa0dab3d6 (diff) | |
download | initscripts-e98a352e9568ec31b33af8671987d026f1f73647.tar.xz |
Merge remote-tracking branch 'seblu/master'
Conflicts:
rc
Trivial conflict with Dave's counting vs summing patch.
Signed-off-by: Tom Gundersen <teg@jklm.no>
-rwxr-xr-x | rc | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -43,8 +43,14 @@ case $1 in *) action=$1 shift + # set same environment variables as init + runlevel=$(/sbin/runlevel) + ENV="PATH='/bin:/usr/bin:/sbin:/usr/sbin'" + ENV+=" PREVLEVEL='${runlevel:0:1}'" + ENV+=" RUNLEVEL='${runlevel:2:1}'" + ENV+=" CONSOLE='${CONSOLE:-/dev/console}'" for i; do - [[ -x "/etc/rc.d/$i" ]] && "/etc/rc.d/$i" $action + [[ -x "/etc/rc.d/$i" ]] && cd / && eval /usr/bin/env -i $ENV "/etc/rc.d/$i" "$action" (( ret += !! $? )) # clamp exit value to 0/1 done esac |