PKGBUILDs/extra/pm-utils/daemons.patch

21 lines
743 B
Diff
Raw Normal View History

2010-03-01 18:24:24 +00:00
--- 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