This is my trap:
It has been set up at script's start.
Now sh code:
Once it hits a reboot, the trap never gets executed!
Advice? :stud
Code:
trap -- 'echo
echo Going down!
exit "$_CODE"' EXIT
trap -- 'echo
echo Going down!
exit "$_CODE"' HUP
trap -- 'echo
echo Going down!
exit "$_CODE"' INT
trap -- 'echo
echo Going down!
exit "$_CODE"' QUIT
trap -- 'echo
echo Going down!
exit "$_CODE"' TERM
Now sh code:
Code:
echo Regular code ...
reboot
Once it hits a reboot, the trap never gets executed!
Advice? :stud