PageRenderTime 98ms CodeModel.GetById 94ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1#!/bin/sh
 2
 3# Action script ensure that unattended-upgrades is finished 
 4# before a hibernate 
 5#
 6# Copyright: Copyright (c) 2009 Michael Vogt
 7# License:   GPL-2
 8#
 9
10PATH=/sbin:/usr/sbin:/bin:/usr/bin
11
12if [ ! -x /usr/share/unattended-upgrades/unattended-upgrade-shutdown ]; then
13	exit 0
14fi
15
16SELF=unattended-upgrades-hibernate
17COMMAND=
18IFPLUGD_IFACE=
19
20# pm-action(8) - <action> <suspend method>
21#
22# On suspend|hibernate, disconnect any wpa-roam managed interfaces,
23# reconnect it on resume.
24
25case "${1}" in
26        hibernate)
27         	python /usr/share/unattended-upgrades/unattended-upgrade-shutdown       
28                ;;
29        resume|thaw)
30		# nothing
31                ;;
32esac
33