diff --git a/src/etc/rc.d/rc.subr b/src/etc/rc.d/rc.subr index 4ab9e9ee..01f7407e 100644 --- a/src/etc/rc.d/rc.subr +++ b/src/etc/rc.d/rc.subr @@ -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 # Copyright (c) 2010, 2011 Ingo Schwarze @@ -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"