summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts/initscripts-1.0/single
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0/single')
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/single24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/single b/meta/recipes-core/initscripts/initscripts-1.0/single
new file mode 100755
index 0000000..da82d17
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/single
@@ -0,0 +1,24 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: single
4# Required-Start: $local_fs $all killprocs
5# Required-Stop:
6# Default-Start: 1
7# Default-Stop:
8# Short-Description: executed by init(8) upon entering runlevel 1 (single).
9### END INIT INFO
10
11PATH="/sbin:/bin:/usr/sbin:/usr/bin"
12
13# Kill all processes.
14echo "Sending all processes the TERM signal..."
15killall5 -15
16sleep 5
17echo "Sending all processes the KILL signal..."
18killall5 -9
19
20# We start update here, since we just killed it.
21test -x /sbin/update && update
22
23echo "Entering single-user mode..."
24exec init -t1 S