/pm/sleep.d/10_unattended-upgrades-hibernate
http://github.com/brinkman83/bashrc · Shell · 33 lines · 14 code · 7 blank · 12 comment · 1 complexity · a7b97909d974f309a2ed541d29b261b2 MD5 · raw file
- #!/bin/sh
- # Action script ensure that unattended-upgrades is finished
- # before a hibernate
- #
- # Copyright: Copyright (c) 2009 Michael Vogt
- # License: GPL-2
- #
- PATH=/sbin:/usr/sbin:/bin:/usr/bin
- if [ ! -x /usr/share/unattended-upgrades/unattended-upgrade-shutdown ]; then
- exit 0
- fi
- SELF=unattended-upgrades-hibernate
- COMMAND=
- IFPLUGD_IFACE=
- # pm-action(8) - <action> <suspend method>
- #
- # On suspend|hibernate, disconnect any wpa-roam managed interfaces,
- # reconnect it on resume.
- case "${1}" in
- hibernate)
- python /usr/share/unattended-upgrades/unattended-upgrade-shutdown
- ;;
- resume|thaw)
- # nothing
- ;;
- esac