#!/bin/sh # Reset the System Clock to UTC if the hardware clock from which it # was copied by the kernel was in localtime. dev=$1 if [ -e /sys/fs/cgroup/systemd ] ; then exit 0 fi if [ -f /etc/default/rcS ] ; then . /etc/default/rcS fi # These defaults are user-overridable in /etc/default/hwclock BADYEAR=no HWCLOCKACCESS=yes HWCLOCKPARS= HCTOSYS_DEVICE=rtc0 if [ -f /etc/default/hwclock ] ; then . /etc/default/hwclock fi if [ yes = "$BADYEAR" ] ; then /sbin/hwclock --rtc=$dev --systz --badyear else /sbin/hwclock --rtc=$dev --systz fi