FS#11685 - [pm-utils 1.2.2.1] -- a little tweak for Arch compatibility

Attached to Project: Arch Linux
Opened by Fnord Popos (noddy) - Wednesday, 08 October 2008, 16:25 GMT
Last edited by Thayer Williams (thayer) - Sunday, 07 December 2008, 21:00 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Thayer Williams (thayer)
Architecture All
Severity Low
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Functions stopservice and restartservice in /usr/lib/pm-utils/functions are a natural way to handle services in site-local scripts for pm-utils. stopservice however uses the wrong way to check if a service is running -- many services don't implement "status" parameter. I think this should cover all cases:

--- a/usr/lib/pm-utils/functions 2008-10-07 00:57:31.000000000 +0200
+++ b/usr/lib/pm-utils/functions 2008-10-08 16:46:35.000000000 +0200
@@ -142,7 +142,7 @@

stopservice()
{
- if service "$1" status 2>/dev/null | grep -c -q running; then
+ if [[ -e /var/run/daemons/$1 ]] || service "$1" status 2>/dev/null | grep -c -q running; then
touch "${STORAGEDIR}/service:$1"
service "$1" stop
fi


Additional info:
* package version(s)

pm-utils 1.2.2.1-1

This task depends upon

Closed by  Thayer Williams (thayer)
Sunday, 07 December 2008, 21:00 GMT
Reason for closing:  Implemented
Comment by Thayer Williams (thayer) - Sunday, 07 December 2008, 20:59 GMT
Thanks, I've incorporated this into pm-utils-1.2.3-3.

Loading...