summaryrefslogtreecommitdiff
path: root/xi/init.d/reboot
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-03-29 23:36:22 +0100
committerdavidovski <david@davidovski.xyz>2022-03-29 23:36:22 +0100
commitdf88860947686a5e6507fc5d60ff33eac1158c6b (patch)
treed1dc7f2f003b08afb6d45f7170d7a0dd353060d3 /xi/init.d/reboot
parent33d239ecb3d66db2b005afbe68a7029c3f2d2ee0 (diff)
using sysvinit system bootscriptsHEADmaster
Diffstat (limited to 'xi/init.d/reboot')
-rw-r--r--xi/init.d/reboot47
1 files changed, 47 insertions, 0 deletions
diff --git a/xi/init.d/reboot b/xi/init.d/reboot
new file mode 100644
index 0000000..b41b033
--- /dev/null
+++ b/xi/init.d/reboot
@@ -0,0 +1,47 @@
+#!/bin/sh
+########################################################################
+# Begin reboot
+#
+# Description : Reboot Scripts
+#
+# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
+# DJ Lucas - dj@linuxfromscratch.org
+# Updates : Bruce Dubbs - bdubbs@linuxfromscratch.org
+# : Pierre Labastie - pierre@linuxfromscratch.org
+#
+# Version : LFS 7.0
+#
+# Notes : Update March 24th, 2022: change "stop" to "start".
+# Add the $last facility to Required-start
+#
+########################################################################
+
+### BEGIN INIT INFO
+# Provides: reboot
+# Required-Start: $last
+# Should-Start:
+# Required-Stop:
+# Should-Stop:
+# Default-Start: 6
+# Default-Stop:
+# Short-Description: Reboots the system.
+# Description: Reboots the System.
+# X-LFS-Provided-By: LFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+case "${1}" in
+ start)
+ log_info_msg "Restarting system..."
+ reboot -d -f -i
+ ;;
+
+ *)
+ echo "Usage: ${0} {start}"
+ exit 1
+ ;;
+
+esac
+
+# End reboot