I have a Debian server with an encrypted luks partition and I would like to run the following command before switch_Root
shutdown -H +5
I tried to put a script in/etc/initramfs-tools/scripts/init-top but the shutdown
command is not working in initramfs. It says "command not found".
So I tried the halt
command but it does not support scheduling. Is it possible to execute halt
command with 5 minutes delay like I can with the shutdown
command?
How can I automatically shutdown my server if the luks partition is not unlocked in 5 minutes?