Browse Source

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@
OPENBSD_5_5
schwarze 11 years ago
parent
commit
4ba743acc2
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/etc/rc

+ 2
- 1
src/etc/rc View File

@ -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


Loading…
Cancel
Save