My VBox CentOS 7 image with some custom software has a problem that it shuts down too long. I'd like to find the culprit by running shell commands from the console, but all shells are being killed.
I tried to protect the bash process with the "at"-sign (
@) and ignore
HUP, but it's apparently not enough.
# cat /tmp/dontkillme.rc if [ -f ~/.bashrc ]; then . ~/.bashrc fi trap '' HUP # # TERM=linux setsid bash -c 'exec -a "@dontkillme" /bin/bash --rcfile /tmp/dontkillme.rc -i <>/dev/tty8 >&0 2>&1' # # poweroff #
This enables bash on
tty8 for some time, but in the end it's being killed too, but the image stays powered on