PKGBUILDs/extra/pm-utils/daemons.patch

21 lines
740 B
Diff
Raw Normal View History

2009-10-10 02:23:22 +00:00
--- pm/functions.in.bak 2009-02-17 21:25:46.940839964 -0800
+++ pm/functions.in 2009-02-17 21:26:55.506262018 -0800
@@ -129,7 +129,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
@@ -141,7 +141,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