aboutsummaryrefslogtreecommitdiff
path: root/system/pm-utils/patches/pm-utils-functions.in.patch
diff options
context:
space:
mode:
authorRobby Workman <rw@rlworkman.net>2010-05-11 22:55:26 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:55:26 +0200
commit692d3b71e71eb3ef0c044a6b56f82b795afa8d0d (patch)
tree2e776e2f82ecd77594e8d6886f829ae888518498 /system/pm-utils/patches/pm-utils-functions.in.patch
parentac86efbc483a1c3dd2988a8ad865332baf1dc8d3 (diff)
system/pm-utils: Added to 12.1 repository
Diffstat (limited to 'system/pm-utils/patches/pm-utils-functions.in.patch')
-rw-r--r--system/pm-utils/patches/pm-utils-functions.in.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/system/pm-utils/patches/pm-utils-functions.in.patch b/system/pm-utils/patches/pm-utils-functions.in.patch
new file mode 100644
index 0000000000000..834fe6599cd87
--- /dev/null
+++ b/system/pm-utils/patches/pm-utils-functions.in.patch
@@ -0,0 +1,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