~ubuntu-core-dev/unattended-upgrades/ubuntu

« back to all changes in this revision

Viewing changes to pm/sleep.d/10_unattended-upgrades-hibernate

  • Committer: Michael Vogt
  • Date: 2010-08-02 09:04:20 UTC
  • mfrom: (136 ubuntu)
  • mto: This revision was merged to the branch mainline in revision 139.
  • Revision ID: michael.vogt@ubuntu.com-20100802090420-b1vaha9f359q9vto
mergedĀ fromĀ ubuntu

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
10
PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
11
 
 
12
if [ ! -x /usr/share/unattended-upgrades/unattended-upgrade-shutdown ]; then
 
13
        exit 0
 
14
fi
 
15
 
 
16
SELF=unattended-upgrades-hibernate
 
17
COMMAND=
 
18
IFPLUGD_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
 
 
25
case "${1}" in
 
26
        hibernate)
 
27
                python /usr/share/unattended-upgrades/unattended-upgrade-shutdown       
 
28
                ;;
 
29
        resume|thaw)
 
30
                # nothing
 
31
                ;;
 
32
esac
 
33