7.8. Creating the halt script

Create the /etc/init.d/halt script by running the following command:

cat > /etc/init.d/halt << "EOF"
#!/bin/sh
# Begin /etc/init.d/halt

#
# Call halt. See man halt for the meaning of the parameters
#

/sbin/halt -d -f -i -p

# End /etc/init.d/halt
EOF