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

« back to all changes in this revision

Viewing changes to debian/hwclock.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 - adjust system clock and timezone
 
2
#
 
3
# The hwclock task adjusts the system clock when the hardware clock is
 
4
# set to localtime (e.g. when dual-booting with Windows), and also
 
5
# ensures that the system timezone is set so that timestamps are written
 
6
# to FAT devices.
 
7
 
 
8
description     "adjust system clock and timezone"
 
9
 
 
10
start on starting mountall
 
11
 
 
12
task
 
13
 
 
14
script
 
15
    . /etc/default/rcS
 
16
    [ "$UTC" = "yes" ] && tz="--utc" || tz="--localtime"
 
17
    [ "$BADYEAR" = "yes" ] && badyear="--badyear"
 
18
    exec hwclock --systz $tz --noadjfile $badyear
 
19
end script