[Pm-utils] [PATCH 07/12] Proposed pm-utils 1.2.3 patches, take 2
Victor Lowther
victor.lowther at gmail.com
Sun Nov 30 16:33:16 PST 2008
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
More information about the Pm-utils
mailing list