#!/bin/sh #---------------------------------------------------------------------------- # /etc/rc.d/rc100.time # # Last Update: $Id$ # # Copyright (c) 2000-2002 - Frank Meyer # Copyright (c) 2002-2016 - fli4l-Team #---------------------------------------------------------------------------- begin_script BASETIME "setup system time..." #---------------------------------------------------------------------------- # set local time zone #---------------------------------------------------------------------------- TZ=$TIME_INFO export TZ echo $TZ > /etc/TZ echo export TZ=$TIME_INFO >>/.profile if [ "$OPT_Y2K" = "yes" ] then add-days --utc $Y2K_DAYS echo 1 >/var/run/broken_rtc # used by chrony fi #---------------------------------------------------------------------------- # set system time #---------------------------------------------------------------------------- if [ -f /sbin/hwclock -a -c /dev/rtc0 ] then > /var/run/utmp adjtimedir=/var/lib/persistent/base mkdir -p $adjtimedir hwclock --hctosys --nodrift --fast --adjfile=$adjtimedir/adjtime fi end_script