Support Slackware init system.

---
 pm/functions.in |   15 +++++++--------
 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
 
-- 
1.6.0.4

_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils

Reply via email to