diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-02-19 21:47:16 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-02-19 21:47:16 +0000 |
commit | e6535680fffbc32846e8926937a8df56cfc6f630 (patch) | |
tree | fde637505b288cdac7dd8720499513fd0174d2de /etc/rc | |
parent | a784cd747b7feedd38ec07804f6bcb642c01d6ef (diff) |
Ignore blank characters at the end of ${pkg_scripts} in order
to refrain from trying to execute /etc/rc.d/ in that case.
Problem noticed by jasper@.
Opinions on this patch vary: "much nicer, ok" sthen@
"good god, what horrible shell voodoo, ok" ajacoutot@
Diffstat (limited to 'etc/rc')
-rw-r--r-- | etc/rc | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.420 2014/01/19 09:39:04 claudio Exp $ +# $OpenBSD: rc,v 1.421 2014/02/19 21:47:15 schwarze Exp $ # System startup script run by init on autoboot # or after single-user. @@ -234,6 +234,7 @@ if [ X"$1" = X"shutdown" ]; then # If we are in secure level 0, assume single user mode. if [ `sysctl -n kern.securelevel` -ne 0 ]; then + pkg_scripts=${pkg_scripts%%*( )} if [ -n "${pkg_scripts}" ]; then echo -n 'stopping package daemons:' while [ -n "${pkg_scripts}" ]; do |