PKGBUILDs/extra/pm-utils/daemons.patch
2010-03-01 12:24:24 -06:00

20 lines
743 B
Diff
Executable file

--- a/pm/functions.in 2009-11-07 21:51:04.000000000 -0800
+++ b/pm/functions.in 2009-12-01 17:30:59.000000000 -0800
@@ -141,7 +141,7 @@
if ! command_exists service; then
service()
{
- for svc in "/etc/init.d/$1" "/etc/rc.d/rc.$1"; do #lsb, then slack
+ for svc in "/etc/init.d/$1" "/etc/rc.d/$1"; do #lsb, then slack
[ -x "$svc" ] && { shift; "$svc" "$@"; return $?; }
done
# this only happens if we did not find the service
@@ -153,7 +153,7 @@
stopservice()
{
- if service "$1" status 2>/dev/null | grep -q -e running -e started
+ if [[ -e "/var/run/daemons/$1" ]] || service "$1" status 2>/dev/null | grep -q -e running -e started
then
touch "${STORAGEDIR}/service:$1"
service "$1" stop