aboutsummaryrefslogtreecommitdiffstats
path: root/main/chrony/chronyd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/chrony/chronyd.initd')
-rw-r--r--main/chrony/chronyd.initd9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/chrony/chronyd.initd b/main/chrony/chronyd.initd
index bf19f31980..4fe5135615 100644
--- a/main/chrony/chronyd.initd
+++ b/main/chrony/chronyd.initd
@@ -35,8 +35,17 @@ checkconfig() {
return 0
}
+setxtrarg() {
+ if [ -c /dev/rtc ]; then
+ grep -q '^rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s"
+ fi
+ grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r"
+ return 0
+}
+
start() {
checkconfig || return $?
+ setxtrarg
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/chronyd.pid