2001-01-24 00:31:17 +00:00
|
|
|
<sect1 id="ch07-reboot">
|
|
|
|
<title>Creating the reboot script</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Create a new file <filename>/etc/init.d/reboot</filename> containing the
|
|
|
|
following:
|
|
|
|
</para>
|
|
|
|
|
2001-07-10 16:06:31 +01:00
|
|
|
<para>
|
|
|
|
<screen>
|
2001-01-24 00:31:17 +00:00
|
|
|
<userinput>cat > reboot << "EOF"</userinput>
|
|
|
|
#!/bin/sh
|
|
|
|
# Begin /etc/init.d/reboot
|
|
|
|
|
|
|
|
#
|
|
|
|
# Call reboot. See man halt for the meaning of the parameters
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
echo "System reboot in progress..."
|
|
|
|
|
|
|
|
/sbin/reboot -d -f -i
|
|
|
|
|
|
|
|
# End /etc/init.d/reboot
|
|
|
|
<userinput>EOF</userinput>
|
2001-07-10 16:06:31 +01:00
|
|
|
</screen>
|
|
|
|
</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
|
|
|
</sect1>
|
|
|
|
|