blob: 1172584170f9e11f43a23117923dee70edf00850 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/bin/sh
Patrick Williams45852732022-04-02 08:58:32 -05002#
3# SPDX-License-Identifier: GPL-2.0-only
4#
5
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006### BEGIN INIT INFO
7# Provides: single
8# Required-Start: $local_fs $all killprocs
9# Required-Stop:
10# Default-Start: 1
11# Default-Stop:
12# Short-Description: executed by init(8) upon entering runlevel 1 (single).
13### END INIT INFO
14
15PATH="/sbin:/bin:/usr/sbin:/usr/bin"
16
17# Kill all processes.
18echo "Sending all processes the TERM signal..."
19killall5 -15
20sleep 5
21echo "Sending all processes the KILL signal..."
22killall5 -9
23
24# We start update here, since we just killed it.
25test -x /sbin/update && update
26
27echo "Entering single-user mode..."
28exec init -t1 S