summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-03-20 19:33:44 -0500
committerVictor Lowther <victor.lowther@gmail.com>2008-03-20 19:33:44 -0500
commitbf5f55f5b5ec375ac1b0b565011b8bf9d0ccf178 (patch)
treed8d661e66bc519164548e48e50a56bc81a92b9c6 /pm
parent61e2d92c43953537855e89b744844b0af7b84700 (diff)
Avoid incorrect exit code 1 failure messages in the log.
Do this by forcing resume_video to always return 0, and by having modreload expliticly log if it cannot reload a module we unloaded before suspend.
Diffstat (limited to 'pm')
-rw-r--r--pm/functions.in5
-rwxr-xr-xpm/sleep.d/99video1
2 files changed, 5 insertions, 1 deletions
diff --git a/pm/functions.in b/pm/functions.in
index af4e291..d804ad0 100644
--- a/pm/functions.in
+++ b/pm/functions.in
@@ -123,7 +123,10 @@ modunload()
modreload()
{
for x in "${STORAGEDIR}"/module:* ; do
- [ -O "${x}" ] && modprobe "${x##*:}" >/dev/null 2>&1
+ [ -O "${x}" ] || continue
+ modprobe "${x##*:}" >/dev/null 2>&1 || \
+ log "Could not reload module ${x##*:}."
+
done
}
diff --git a/pm/sleep.d/99video b/pm/sleep.d/99video
index 1663dff..1f99f85 100755
--- a/pm/sleep.d/99video
+++ b/pm/sleep.d/99video
@@ -110,6 +110,7 @@ resume_video()
quirk "${QUIRK_RADEON_OFF}" && radeon_on
quirk "${QUIRK_DPMS_ON}" && vbe dpms on
quirk "${QUIRK_RESET_BRIGHTNESS}" && reset_brightness
+ return 0 # avoid spurious hook exit failure message.
}
help() {