|
|
@ -1,4 +1,4 @@ |
|
|
|
# $OpenBSD: rc.subr,v 1.33 2011/04/06 06:09:28 ajacoutot Exp $ |
|
|
|
# $OpenBSD: rc.subr,v 1.34 2011/04/06 17:10:38 robert Exp $ |
|
|
|
|
|
|
|
# Default functions and variables used by rc.d(8) scripts. |
|
|
|
|
|
|
@ -33,7 +33,8 @@ rc_do() { |
|
|
|
|
|
|
|
rc_print() { |
|
|
|
_ret=$? |
|
|
|
echo ${INRC:+'-n'} "${INRC:+ }${_name}($1)" |
|
|
|
[ -z "${INRC}" -o X"$1" != X"ok" ] && _pfix="($1)" |
|
|
|
echo ${INRC:+'-n'} "${INRC:+ }${_name}${_pfix}" |
|
|
|
return ${_ret} |
|
|
|
} |
|
|
|
|
|
|
@ -89,7 +90,7 @@ rc_cmd() { |
|
|
|
fi |
|
|
|
;; |
|
|
|
reload) |
|
|
|
rc_do rc_check && rc_do rc_reload |
|
|
|
rc_do rc_check && ( rc_do rc_reload || rc_print failed ) |
|
|
|
;; |
|
|
|
restart) |
|
|
|
/etc/rc.d/${_name} stop && /etc/rc.d/${_name} start |
|
|
|