From b2a80ada2914a33e32ab0033be090f4a7df5e988 Mon Sep 17 00:00:00 2001 From: Greg Haerr Date: Mon, 30 Dec 2024 14:07:13 -0700 Subject: [PATCH] [cmds] Display "Can't run OpenWatcom OS/2 program" when CONFIG_EXEC_OS2 not set --- elkscmd/ash/exec.c | 3 +++ elkscmd/rootfs_template/etc/profile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/elkscmd/ash/exec.c b/elkscmd/ash/exec.c index e004c23c9..8c8a06118 100644 --- a/elkscmd/ash/exec.c +++ b/elkscmd/ash/exec.c @@ -168,6 +168,9 @@ tryexec(cmd, argv, envp) argv[0] = cmd; execinterp(argv, envp); } + if (parsenleft > 2 && p[0] == 'M' && p[1] == 'Z') { + error2("Can't run OpenWatcom OS/2 program", "Set CONFIG_EXEC_OS2=y in kernel"); + } #endif setparam(argv + 1); exraise(EXSHELLPROC); diff --git a/elkscmd/rootfs_template/etc/profile b/elkscmd/rootfs_template/etc/profile index 7b0a05ca8..8925560bc 100644 --- a/elkscmd/rootfs_template/etc/profile +++ b/elkscmd/rootfs_template/etc/profile @@ -1,4 +1,4 @@ -export PATH=/bin +export PATH=.:/bin PS1="$HOSTNAME$PS1" umask 022 #FAT permissions fix