aboutsummaryrefslogtreecommitdiff
path: root/rc.d
diff options
context:
space:
mode:
authorSebastien Luttringer <seblu@seblu.net>2011-05-31 08:25:28 +0200
committerSebastien Luttringer <seblu@seblu.net>2011-05-31 08:26:48 +0200
commita7627c6d0784ca169b14265744ce356a7d740f62 (patch)
tree549d84c2a2d065ef49005599abfaae084078d862 /rc.d
parentd0340e988f96f38cfb518d88e1e6d6e8a3b1cf8c (diff)
downloadinitscripts-a7627c6d0784ca169b14265744ce356a7d740f62.tar.xz
rc.d: Remove cd from the loop
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d3
1 files changed, 2 insertions, 1 deletions
diff --git a/rc.d b/rc.d
index af29574..3c7fcb9 100755
--- a/rc.d
+++ b/rc.d
@@ -51,8 +51,9 @@ case $1 in
"RUNLEVEL=${runlevel##* }"
"CONSOLE=${CONSOLE:-/dev/console}"
"TERM=$TERM")
+ cd /
for i; do
- [[ -x "/etc/rc.d/$i" ]] && cd / && /usr/bin/env -i "${ENV[@]}" "/etc/rc.d/$i" "$action"
+ [[ -x "/etc/rc.d/$i" ]] && /usr/bin/env -i "${ENV[@]}" "/etc/rc.d/$i" "$action"
(( ret += !! $? )) # clamp exit value to 0/1
done
esac