Files
LibreELEC.tv/packages/linux/init.d/01_time

20 lines
387 B
Bash

#!/bin/sh
#
# set time
#
# runlevels: openelec, text, debug
. /etc/sysconfig
progress "saving Starttime"
ADJTIME=/etc/adjtime
#. /etc/funcs
if [ -x /sbin/hwclock ]; then
make_persistent file ${ADJTIME} /var/data/config/adjtime create
[ -r ${ADJTIME} ] && ! ( grep -q "LOCAL" ${ADJTIME} || grep -q "UTC" ${ADJTIME} ) && echo "UTC" >>${ADJTIME}
/sbin/hwclock --hctosys
fi