1#!/bin/sh
2
3# Stop all init scripts in /etc/rc6.d
4# executing them in numerical order.
5#
6for i in /etc/rc6.d/K??*; do
7
8	# Ignore dangling symlinks (if any).
9	[ ! -f "$i" ] && continue
10
11	case "$i" in
12	*.sh)
13		# Source shell script for speed.
14		(
15		trap - INT QUIT TSTP
16		set stop
17		. $i
18		)
19		;;
20	*)
21		# No sh extension, so fork subprocess.
22		$i stop
23		;;
24	esac
25done
26
27