first commit
This commit is contained in:
19
etc_org/init/hwclock-save.conf
Normal file
19
etc_org/init/hwclock-save.conf
Normal file
@@ -0,0 +1,19 @@
|
||||
# hwclock-save - save system clock to hardware clock
|
||||
#
|
||||
# This task saves the time from the system clock back to the hardware
|
||||
# clock on shutdown.
|
||||
|
||||
description "save system clock to hardware clock"
|
||||
|
||||
start on runlevel [06]
|
||||
|
||||
task
|
||||
|
||||
script
|
||||
# BADYEAR can be in either file
|
||||
. /etc/default/rcS
|
||||
[ ! -r /etc/default/hwclock ] || . /etc/default/hwclock
|
||||
grep -qw LOCAL /etc/adjtime 2>/dev/null && tz="--localtime" || tz="--utc"
|
||||
[ "$BADYEAR" = "yes" ] && badyear="--badyear"
|
||||
exec hwclock --rtc=/dev/rtc0 --systohc $tz --noadjfile $badyear
|
||||
end script
|
||||
Reference in New Issue
Block a user