the script is running fine with the direct execution but when i point the script location to /etc/inititab
-rwxr-xr-x 1 root root 146 Oct 5 16:59 /usr/bin/prompt.sh
when C-A-D is pressed ,its prompting for the question, it hangs most often ,sometimes allows me to give yes or no answer.
Originally Posted by towheedm
I do not think it can be done directly with the shutdown command. One way would be to do it in a script. Something like:
read -p "Are you sure you want to shutdown [yes/no]?
if [ $REPLY = "yes" ]; then
/sbin/shutdown -t3 -r now &
Make it executable with owner root:root.
Then modify /etc/inittab to point to this script:
Hope it helps.