From c66c6f15f1ef15741842b4e573bcd9dfb28a7528 Mon Sep 17 00:00:00 2001 From: Victor Lowther Date: Sun, 11 Apr 2010 14:59:50 -0500 Subject: Create a pm-utils local service command for distros that do not have one. --- pm/functions.in | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'pm') 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() { -- cgit v1.2.3