Hi, I would like to know how to have a linux (RHEL/CENTOS/SL 6.8) container exit immediately
after running a test script at init level 3 (after networking starts) something on the order of
(wouldn’t it be nice if there was a language to create such a script from human language!)
[note variables are text, not numeric]
$FOO=[some string determined at startup]
$BAR=[another string determined at startup]
If $FOO .ne $BAR then exit this container with message:
“Sorry, this container will not run on your system.”
I have tried a number of /bin/bash scripts, none of which seem to work.
The container does not like “logout” nor “shutdown -h now” nor “exit” nor
"kill -9 $PPID".
It only seems to accept “exit” from the command line.