summaryrefslogtreecommitdiffstats
path: root/daemonsbkg/daemonsbkg-0.1.3/daemonsbkg.patch
blob: cc2153698940e58028ddcc336b67e81cb060f63c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- /etc/rc.local.shutdown	2008-09-18 22:21:39.000000000 +0200
+++ /etc/rc.local.shutdown.new	2008-10-19 13:55:32.000000000 +0200
@@ -3,3 +3,16 @@
 # /etc/rc.local.shutdown: Local shutdown script.
 #
 
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
+	# Shutdown background daemons
+	let i=${#DAEMONSBKG[@]}
+	while [ $i -ge 0 ]; do
+		if [ "${DAEMONSBKG[$i]:0:1}" != '!' ]; then
+			ck_daemon ${DAEMONSBKG[$i]#@} || stop_daemon ${DAEMONSBKG[$i]#@}
+		fi
+		let i=i-1
+	done
+fi
\ No newline at end of file

--- /etc/rc.multi	2008-09-18 22:21:39.000000000 +0200
+++ /etc/rc.multi.new	2008-10-19 13:55:32.000000000 +0200
@@ -20,6 +20,9 @@
 	fi
 done
 
+# Start background daemons
+/etc/rc.local.daemons &
+
 if [ -x /etc/rc.local ]; then
 	/etc/rc.local
 fi