commit cdee5b135ed3d8326d64c04bf2b2e82e30b0c2e5 parent 6527552b4aea1f95a38bbbc3b381f9dd13514d4f Author: Jan Pobříslo <ccx@te2000.cz> Date: Thu, 16 Dec 2021 16:39:03 +0000 Rework the NS_NO_PID1 check. Diffstat:
M | sbin/ns_run | | | 6 | +++--- |
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sbin/ns_run b/sbin/ns_run @@ -34,11 +34,11 @@ multisubstitute { getpid PID ifelse { importas -D "" NS_NO_PID1 NS_NO_PID1 - if -x 0 { test -z $NS_NO_PID1 } - importas -i PID PID test 1 -ne $PID + importas -i PID PID + test -z ${NS_NO_PID1} -a 1 -ne $PID } { fdmove -c 1 2 - echo "ns_run: fatal: not PID 1" + foreground { echo "ns_run: fatal: not PID 1" } exit 111 } unexport PID