~ubuntu-branches/ubuntu/lucid/util-linux/lucid-security

« back to all changes in this revision

Viewing changes to debian/hwclock.hwclock-save.upstart

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2009-09-15 15:14:58 UTC
  • Revision ID: james.westby@ubuntu.com-20090915151458-srmn71i5663htba3
Tags: 2.16-1ubuntu2
FFE LP: #427356.

* Replace hwclock udev rule with an Upstart job.  This has never needed
  to be a udev rule after all since it doesn't access the hardware!
* Replace init script with an Upstart job run on shutdown.
* debian/control:
  - Bump build-dependency on debhelper for Upstart-aware dh_installinit
  - Add missing ${misc:Depends}

* Fix build with newer glibc due to versionsort() prototype change.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# hwclock-save - save system clock to hardware clock
 
2
#
 
3
# This task saves the time from the system clock back to the hardware
 
4
# clock on shutdown.
 
5
 
 
6
description     "save system clock to hardware clock"
 
7
 
 
8
start on runlevel [06]
 
9
 
 
10
task
 
11
 
 
12
script
 
13
    . /etc/default/rcS
 
14
    [ "$UTC" = "yes" ] && tz="--utc" || tz="--localtime"
 
15
    [ "$BADYEAR" = "yes" ] && badyear="--badyear"
 
16
    exec hwclock --rtc=/dev/rtc0 --systohc $tz --noadjfile $badyear
 
17
end script