diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-03-30 21:57:13 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-03-30 21:57:13 +0200 |
commit | 84424e82e5407315d2cedfe33c45629ffd8b56d8 (patch) | |
tree | c90e97486afccd6148975c802b6196798a67acb1 /src/core/libs/lib-misc.sh | |
parent | 940dde541435a9af38dc2c4c8a1f498dd21e5308 (diff) |
fix hwclock calls for systohc and hctosys, fix /etc/localtime, show nice dialog with 'ok', 'manual date setting' and ntp using
Diffstat (limited to 'src/core/libs/lib-misc.sh')
-rw-r--r-- | src/core/libs/lib-misc.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/libs/lib-misc.sh b/src/core/libs/lib-misc.sh index e09f3c8..1e8df8e 100644 --- a/src/core/libs/lib-misc.sh +++ b/src/core/libs/lib-misc.sh @@ -103,18 +103,20 @@ cleanup_runtime () # $1 UTC or localtime (hardwareclock) +# $2 direction (systohc or hctosys) dohwclock() { + # TODO: we probably only need to do this once and then actually use adjtime on next invocations infofy "Resetting hardware clock adjustment file" [ ! -d /var/lib/hwclock ] && mkdir -p /var/lib/hwclock if [ ! -f /var/lib/hwclock/adjtime ]; then echo "0.0 0 0.0" > /var/lib/hwclock/adjtime fi - infofy "Syncing hardwareclock to systemclock ..." + infofy "Syncing clocks ($2), hc being $1 ..." if [ "$1" = "UTC" ]; then - hwclock --utc + hwclock --$2 --utc else - hwclock --localtime + hwclock --$2 --localtime fi } |