summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2009-01-18 11:20:47 -0800
committerDan Nicholson <dbn.lists@gmail.com>2009-01-18 11:20:47 -0800
commitdf99431ba8ee5a2a5b552f32950ae98eec9757d2 (patch)
tree7bdd212b53c2573fd0656353f44d70a003c1f387 /pm
parent68e38d6e7746fe8d36d80f5b85d5b704bf49bcf2 (diff)
Match gentoo message "started" when checking for running services
Gentoo uses the convention of printing the message "started" when showing the status of services. Augment stopservice() to check this in addition to "running". This also drops the unnecessary -c argument from the grep command. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Diffstat (limited to 'pm')
-rw-r--r--pm/functions.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/pm/functions.in b/pm/functions.in
index 70740cb..019e8d2 100644
--- a/pm/functions.in
+++ b/pm/functions.in
@@ -141,7 +141,8 @@ fi
stopservice()
{
- if service "$1" status 2>/dev/null | grep -c -q running; then
+ if service "$1" status 2>/dev/null | grep -q -e running -e started
+ then
touch "${STORAGEDIR}/service:$1"
service "$1" stop
fi