From 37e4aefe97f0dce84c435c3ed07964ea1a6c2d22 Mon Sep 17 00:00:00 2001 From: kn Date: Mon, 20 Feb 2023 01:55:41 +0000 Subject: [PATCH] Disable strict bourne shell mode to get ksh behaviour in (S)hell Enable features like arithmatic expression and thus make the debug aid `FUNCS_ONLY=1 . /install.sub' work in those prompts. '!' answers spawn their own ksh process, but (S)hell drops into /.profile sourced by /bin/sh executed by init(8), i.e. a korn shell defaulting to strict bourne shell mode. Shell options in this interactive parent shell do not effect install.sub aka. /install, /autoinstall and /upgrade as it is executed in a child. OK afresh1 --- distrib/miniroot/dot.profile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/distrib/miniroot/dot.profile b/distrib/miniroot/dot.profile index 8a47b333738..03dccd73869 100644 --- a/distrib/miniroot/dot.profile +++ b/distrib/miniroot/dot.profile @@ -1,4 +1,4 @@ -# $OpenBSD: dot.profile,v 1.50 2022/05/09 22:42:53 deraadt Exp $ +# $OpenBSD: dot.profile,v 1.51 2023/02/20 01:55:41 kn Exp $ # $NetBSD: dot.profile,v 1.1 1995/12/18 22:54:43 pk Exp $ # # Copyright (c) 2009 Kenneth R. Westerback @@ -32,6 +32,9 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +# Turn off Strict Bourne shell. +set +o sh + export VNAME=$(sysctl -n kern.osrelease) export VERSION="${VNAME%.*}${VNAME#*.}" export ARCH=$(sysctl -n hw.machine) -- 2.20.1