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 <[email protected]> --- pm/functions.in | 3 ++- 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 -- 1.6.0.6 _______________________________________________ Pm-utils mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pm-utils
