aboutsummaryrefslogtreecommitdiffstats
path: root/extra/chrony/chronyd.confd
blob: 560825c2c82b9db5b988e4958f8dfae6fe3b10f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# /etc/conf.d/chronyd

CFGFILE="/etc/chrony/chrony.conf"

# Configuration dependant options :
#      -s - Set system time from RTC if rtcfile directive present
#      -r - Reload sample histories if dumponexit directive present
#
# The combination of "-s -r" allows chronyd to perform long term averaging of
# the gain or loss rate across system reboots and shutdowns.

ARGS=""

# devfs creates the device for RTC if it's compiled into kernel
test -c /dev/rtc && {
       grep -q '^rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s"
}
grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r"