diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2021-11-09 11:29:34 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2021-11-09 11:29:34 +0000 |
commit | 5aff56ad607a4905cc95cbf2c367aeaa662acc8f (patch) | |
tree | 30107e110d7784b356b52592fe8e5898db2181cb /etc/rc.d | |
parent | ebd2be1c7940534b23f9a7c7af363138fe94c391 (diff) |
check that the rc script including rc.subr is using ksh; rc.subr uses ksh
features and scripts will not work correctly with sh. tweak jca/ok kn/
ok with direction aja
Diffstat (limited to 'etc/rc.d')
-rw-r--r-- | etc/rc.d/rc.subr | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index 4cefd27cb79..dfdd9229342 100644 --- a/etc/rc.d/rc.subr +++ b/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.143 2021/11/08 10:10:50 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.144 2021/11/09 11:29:33 sthen Exp $ # # Copyright (c) 2010, 2011, 2014-2021 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -285,6 +285,7 @@ rc_cmd() { _name=${0##*/} _rc_check_name "${_name}" || _rc_err "invalid rc.d script name: ${_name}" +[ -n "${KSH_VERSION}" ] || _rc_err "$0: wrong shell, use /bin/ksh" [ -n "${daemon}" ] || _rc_err "$0: daemon is not set" unset _RC_DEBUG _RC_FORCE |