diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2014-08-30 20:33:28 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2014-08-30 20:33:28 +0000 |
commit | bc09d9a57effbb7023181bae5c244699395a232a (patch) | |
tree | af591d61e86dee86e5870401bfb0ddf1b01245d1 | |
parent | 91e8d05ec07fee4ea2edba9600fd885bbe0f6953 (diff) |
Make it possible to pass a specific error code to _rc_err().
ok robert@ schwarze@
-rw-r--r-- | etc/rc.d/rc.subr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index 696f22ecc00..583d9ce9363 100644 --- a/etc/rc.d/rc.subr +++ b/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.88 2014/08/25 07:34:12 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.89 2014/08/30 20:33:27 ajacoutot Exp $ # # Copyright (c) 2010, 2011, 2014 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -21,7 +21,7 @@ _rc_err() { echo "$1" 1>&2 - exit 1 + [ -n "${2}" ] && exit "${2}" || exit 1 } _rc_is_supported() { |