From 4ba743acc222201d5c9a38b58bff8e3684617bf1 Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Wed, 19 Feb 2014 21:47:15 +0000 Subject: [PATCH] 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@ --- src/etc/rc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/etc/rc b/src/etc/rc index 86e72d63..9b2e375b 100644 --- a/src/etc/rc +++ b/src/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