summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-11-30 08:37:20 -0600
committerVictor Lowther <victor.lowther@gmail.com>2008-11-30 18:21:57 -0600
commit3df57b4fbce6243f27d6cbf99f53034f862a9a6e (patch)
treeb1740654ba8abf8c82cea6f97a9a3e67954731b1
parent493224b1beeac0154807bcb1ac8a3007a46c435b (diff)
Support Slackware init system.
-rw-r--r--pm/functions.in15
1 files changed, 7 insertions, 8 deletions
diff --git a/pm/functions.in b/pm/functions.in
index 460d018..70740cb 100644
--- a/pm/functions.in
+++ b/pm/functions.in
@@ -129,14 +129,13 @@ modreload()
if ! command_exists service; then
service()
{
- if [ -x "/etc/init.d/$1" ]; then
- svc="$1"
- shift
- "/etc/init.d/$svc" "$@"
- else
- log "${1}: unrecognized service"
- return 1
- fi
+ 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