1*#!/bin/sh 2*# 3*# SPDX-License-Identifier: GPL-2.0-only 4*# 5* 6*### 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* 15*PATH="/sbin:/bin:/usr/sbin:/usr/bin" 16* 17*# Kill all processes. 18*echo "Sending all processes the TERM signal..." 19*killall5 -15 20*sleep 5 21*echo "Sending all processes the KILL signal..." 22*killall5 -9 23* 24*# We start update here, since we just killed it. 25*test -x /sbin/update && update 26* 27*echo "Entering single-user mode..." 28*exec init -t1 S 29*