Hi, the attached patch implements reading from /etc/adjtime. Since "util-linux 2.20.1-5.1" the settings are not kept in /etc/rcS, they are migrated to /etc/adjtime with values "UTC" or "LOCAL"
Sven Roederer
--- postinst 2014-02-09 21:06:00.000000000 +0100 +++ chrony.postinst 2014-02-09 21:12:32.799536682 +0100 @@ -17,25 +17,29 @@ cp /usr/share/chrony/chrony.conf /etc/chrony/chrony.conf.new # Fix up chrony.conf.new. -. /etc/default/rcS - -case "$UTC" in - no|"") echo "# rtconutc" >> /etc/chrony/chrony.conf.new - MAILUTC="Chrony has been configured to assume that your real-time clock is on local time. +export UTC=`grep "UTC\|LOCAL" /etc/adjtime` +if [ -n "$UTC" ]; then + case "$UTC" in + LOCAL) echo "# rtconutc" >> /etc/chrony/chrony.conf.new + MAILUTC="Chrony has been configured to assume that your real-time clock is on local time. If this is not correct edit /etc/chrony/chrony.conf. The comments explain what to do." - ;; - yes) echo "rtconutc" >> /etc/chrony/chrony.conf.new - MAILUTC="Chrony has been configured to assume that your real-time clock is on UTC time. + ;; + UTC) echo "rtconutc" >> /etc/chrony/chrony.conf.new + MAILUTC="Chrony has been configured to assume that your real-time clock is on UTC time. If this is not correct edit /etc/chrony/chrony.conf. The comments explain what to do." - ;; - *) echo "# Can't tell how your clock is set: assuming local time." >> /etc/chrony/chrony.conf.new - MAILUTC="Can't tell how your clock is set: assuming local time. + ;; + *) echo "# Can't tell how your clock is set: assuming local time." >> /etc/chrony/chrony.conf.new + MAILUTC="Can't tell how your clock is set: assuming local time. + ;; + esac +else + echo "# Can't tell how your clock is set: assuming local time." >> /etc/chrony/chrony.conf.new + MAILUTC="Can't tell how your clock is set: assuming local time. If this is not correct edit /etc/chrony/chrony.conf. The comments explain what to do." - ;; -esac +fi if [ -z "$2" ] ; then
signature.asc
Description: This is a digitally signed message part.