summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2010-04-11 14:59:50 -0500
committerVictor Lowther <victor.lowther@gmail.com>2010-04-11 14:59:50 -0500
commitc66c6f15f1ef15741842b4e573bcd9dfb28a7528 (patch)
tree57bab7f282a12292dbd2d1aa7a8ecb38f70d50de /pm
parent68104102c9d1659183fc0ad998274602802c6b41 (diff)
Create a pm-utils local service command for distros that do not have one.
Diffstat (limited to 'pm')
-rw-r--r--pm/functions.in16
1 files changed, 2 insertions, 14 deletions
diff --git a/pm/functions.in b/pm/functions.in
index 8388c65..2c258e6 100644
--- a/pm/functions.in
+++ b/pm/functions.in
@@ -136,20 +136,8 @@ modreload()
done
}
-# Service management is sysv dependent.
-# TODO: modularize this to make it work with other init systems.
-if ! command_exists service; then
- service()
- {
- for svc in "/etc/init.d/$1" "/etc/rc.d/rc.$1"; do #lsb, then slack
- [ -x "$svc" ] && { shift; "$svc" "$@"; return $?; }
- done
- # this only happens if we did not find the service
- log "${1}: unrecognized service"
- return 1
-
- }
-fi
+# If the service command is not provided by the OS, we will fall back to
+# ${PM_UTILS_LIBDIR)/bin/service.
stopservice()
{