aboutsummaryrefslogtreecommitdiff
path: root/system/pm-utils/patches/pm-utils-functions.in.patch
blob: 834fe6599cd87be28583716427b2e8400a299367 (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
diff -Nur pm-utils-1.2.2.1.orig/pm/functions.in pm-utils-1.2.2.1/pm/functions.in
--- pm-utils-1.2.2.1.orig/pm/functions.in	2008-10-05 20:49:09.000000000 -0500
+++ pm-utils-1.2.2.1/pm/functions.in	2008-10-24 14:49:56.911161730 -0500
@@ -124,15 +124,19 @@
 	done
 }
 
-# Service management is sysv dependent.
-# TODO: modularize this to make it work with other init systems.
 if ! command_exists service; then
 	service()
 	{
+		# Pure SysV init
 		if [ -x "/etc/init.d/$1" ]; then
 			svc="$1"
 			shift
 			"/etc/init.d/$svc" "$@"
+		# Slackware's BSD-style SysV init
+		elif [ -x "/etc/rc.d/rc.${1}" ]; then
+			svc="$1"
+			shift
+			"/etc/rc.d/rc.${1}" "$@"
 		else
 			log "${1}: unrecognized service"
 			return 1