Skip to content

Commit

Permalink
Log the used power management mode to syslog when omv-pm-standby is e…
Browse files Browse the repository at this point in the history
…xecuted.
  • Loading branch information
votdev committed Sep 11, 2016
1 parent 226e4b8 commit 851afdd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deb/openmediavault/debian/changelog
@@ -1,3 +1,9 @@
openmediavault (3.0.36) stable; urgency=low

*

-- Volker Theile <volker.theile@openmediavault.org> Sun, 11 Sep 2016 16:14:18 +0200

openmediavault (3.0.35) stable; urgency=low

* Update locales.
Expand Down
6 changes: 6 additions & 0 deletions deb/openmediavault/usr/sbin/omv-pm-standby
Expand Up @@ -22,6 +22,7 @@
set -e

. /etc/default/openmediavault
. /usr/share/openmediavault/scripts/helper-functions

usage() {
cat <<EOF
Expand Down Expand Up @@ -54,14 +55,19 @@ do
done

if ! which pm-is-supported >/dev/null; then
omv_log "pm-is-supported not found. Power off the system instead."
shutdown -h -P now;
elif pm-is-supported --suspend-hybrid; then
omv_log "Put the system into hybrid-suspend mode."
pm-suspend-hybrid;
elif pm-is-supported --hibernate; then
omv_log "Put the system into hibernate mode."
pm-hibernate;
elif pm-is-supported --suspend; then
omv_log "Put the system into suspend mode."
pm-suspend;
else
omv_log "No power management mode supported. Power off the system instead."
shutdown -h -P now;
fi

Expand Down

0 comments on commit 851afdd

Please sign in to comment.