summaryrefslogtreecommitdiff
path: root/etc/rc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-02-19 21:47:16 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-02-19 21:47:16 +0000
commite6535680fffbc32846e8926937a8df56cfc6f630 (patch)
treefde637505b288cdac7dd8720499513fd0174d2de /etc/rc
parenta784cd747b7feedd38ec07804f6bcb642c01d6ef (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/rc3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/rc b/etc/rc
index 86e72d637d0..9b2e375bc68 100644
--- a/etc/rc
+++ b/etc/rc
@@ -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