Browse Source

Don't output "$action is not supported" when running an rc.d(8) script

from /etc/rc(8). This prevents the warning to be displayed at shutdown
time when the script has rc_stop=NO.
req. and input from fgsch@
"go ahead" schwarze@
input from an ok halex@, ok robert@
OPENBSD_5_3
ajacoutot 12 years ago
parent
commit
9b53ec7347
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      src/etc/rc.d/rc.subr

+ 5
- 2
src/etc/rc.d/rc.subr View File

@ -1,4 +1,4 @@
# $OpenBSD: rc.subr,v 1.66 2012/11/12 08:07:53 ajacoutot Exp $
# $OpenBSD: rc.subr,v 1.67 2012/11/18 18:54:52 ajacoutot Exp $
#
# Copyright (c) 2010, 2011 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@ -102,7 +102,10 @@ rc_cmd() {
rc_err "$0: need root privileges"
eval _enotsup=\${rc_${1}}
[ X"${_enotsup}" != X"NO" ] || rc_err "$0: $1 is not supported"
if [ X"${_enotsup}" = X"NO" ]; then
[ -n "${INRC}" ] && exit 1
rc_err "$0: $1 is not supported"
fi
[ X"${rc_bg}" = X"YES" ] && _bg="&"
[ -n "${_RC_DEBUG}" ] || _n="-n"


Loading…
Cancel
Save