If service was not active at suspend, currently restartservice return an error which results in annoying popups that suspend failed. Make sure we return success if there was nothing to do.
Signed-off-by: Andrey Borzenkov <[EMAIL PROTECTED]>
---
pm/functions.in | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/pm/functions.in b/pm/functions.in
index 110282e..29e58cb 100644
--- a/pm/functions.in
+++ b/pm/functions.in
@@ -150,7 +150,11 @@ stopservice()
restartservice()
{
- [ -O "${STORAGEDIR}/service:$1" ] && service "$1" start
+ if [ -O "${STORAGEDIR}/service:$1" ]; then
+ service "$1" start
+ else
+ return 0
+ fi
}
# Disable a hook.
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Pm-utils mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pm-utils
