|
@ -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. |
|
|
# Default functions and variables used by rc.d(8) scripts. |
|
|
|
|
|
|
|
@ -33,7 +33,8 @@ rc_do() { |
|
|
|
|
|
|
|
|
rc_print() { |
|
|
rc_print() { |
|
|
_ret=$? |
|
|
_ret=$? |
|
|
echo ${INRC:+'-n'} "${INRC:+ }${_name}($1)" |
|
|
|
|
|
|
|
|
[ -z "${INRC}" -o X"$1" != X"ok" ] && _pfix="($1)" |
|
|
|
|
|
echo ${INRC:+'-n'} "${INRC:+ }${_name}${_pfix}" |
|
|
return ${_ret} |
|
|
return ${_ret} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -89,7 +90,7 @@ rc_cmd() { |
|
|
fi |
|
|
fi |
|
|
;; |
|
|
;; |
|
|
reload) |
|
|
reload) |
|
|
rc_do rc_check && rc_do rc_reload |
|
|
|
|
|
|
|
|
rc_do rc_check && ( rc_do rc_reload || rc_print failed ) |
|
|
;; |
|
|
;; |
|
|
restart) |
|
|
restart) |
|
|
/etc/rc.d/${_name} stop && /etc/rc.d/${_name} start |
|
|
/etc/rc.d/${_name} stop && /etc/rc.d/${_name} start |
|
|