diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2021-11-12 08:38:03 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2021-11-12 08:38:03 +0000 |
commit | aaffbc170f2b659d64f370f976d6a4648682d4c9 (patch) | |
tree | bbeb8c4fe5e1e668a2569523d19e3b16f8301f8c /etc/rc.d | |
parent | 4317a3ceff8a4805cf2d0511eef51bd2bc066116 (diff) |
Simplify _rc_exit.
Diffstat (limited to 'etc/rc.d')
-rw-r--r-- | etc/rc.d/rc.subr | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index 0d16649544c..83827267f28 100644 --- a/etc/rc.d/rc.subr +++ b/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.146 2021/11/11 12:08:36 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.147 2021/11/12 08:38:02 ajacoutot Exp $ # # Copyright (c) 2010, 2011, 2014-2021 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -133,14 +133,7 @@ _rc_exit() { local _pfix [ -z "${INRC}" -o X"$1" != X"ok" ] && _pfix="($1)" echo ${INRC:+'-n'} "${_pfix}" - case "$1" in - ok|killed) - exit 0 ;; - timeout) - exit 142 ;; - *) - exit 1 ;; - esac + [[ $1 == @(ok|killed) ]] && exit 0 || exit 1 } _rc_alarm() |