Package: chrony Version: 2.1.1-1 Severity: wishlist Tags: patch Hello Vincent Blut,
would you be willing to add support for the bindcmdaddress and cmdport config options to the scripts using the chronyc command? If yes please find attached a patch which is running on my system currently. Kind regards Harald Jenny -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (990, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 4.4.0-1-amd64 (SMP w/1 CPU core) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages chrony depends on: ii adduser 3.113+nmu3 ii install-info 6.1.0.dfsg.1-5 ii libc6 2.22-3 ii libcap2 1:2.24-12 ii libedit2 3.1-20150325-1+b1 ii libtomcrypt0 1.17-7+b1 ii lsb-base 9.20160110 ii net-tools 1.60+git20150829.73cef8a-2 ii timelimit 1.8-1 ii ucf 3.0035 ii util-linux 2.27.1-4 chrony recommends no packages. chrony suggests no packages. -- no debconf information
diff -Nru chrony-2.1.1_IPROUTE2/debian/chrony.ppp.ip-down chrony-2.1.1_CMDADDRPORT/debian/chrony.ppp.ip-down --- chrony-2.1.1_IPROUTE2/debian/chrony.ppp.ip-down 2016-03-14 21:53:58.573893888 +0100 +++ chrony-2.1.1_CMDADDRPORT/debian/chrony.ppp.ip-down 2016-03-14 20:51:13.833941220 +0100 @@ -8,9 +8,13 @@ /bin/pidof chronyd > /dev/null || exit 0 # Don't mark the connection offline unless we know ppp brought it up. test -e /var/run/chrony-ppp-up || exit 0 -KEY=$(awk '$1 ~ /^commandkey$/ { print $2; exit}' /etc/chrony/chrony.conf) +CMDADDRESS=$(awk '$1 ~ /^bindcmdaddress$/ {print $2; exit 1}' /etc/chrony/chrony.conf \ +&& echo 127.0.0.1) +CMDPORT=$(awk '$1 ~ /^cmdport$/ {print $2; exit 1}' /etc/chrony/chrony.conf \ +&& echo 323) +KEY=$(awk '$1 ~ /^commandkey$/ {print $2; exit}' /etc/chrony/chrony.conf) PASSWORD=`awk '$1 ~ /^'$KEY'$/ {print $2; exit}' /etc/chrony/chrony.keys` -/usr/bin/chronyc << EOF +/usr/bin/chronyc -h $CMDADDRESS -p $CMDPORT << EOF password $PASSWORD offline EOF diff -Nru chrony-2.1.1_IPROUTE2/debian/chrony.ppp.ip-up chrony-2.1.1_CMDADDRPORT/debian/chrony.ppp.ip-up --- chrony-2.1.1_IPROUTE2/debian/chrony.ppp.ip-up 2016-03-14 21:54:09.369710208 +0100 +++ chrony-2.1.1_CMDADDRPORT/debian/chrony.ppp.ip-up 2016-03-14 20:52:52.684259308 +0100 @@ -5,9 +5,13 @@ # were in the public domain. I waive all rights. /bin/pidof chronyd > /dev/null || exit 0 -KEY=$(awk '$1 ~ /^commandkey$/ { print $2; exit}' /etc/chrony/chrony.conf) +CMDADDRESS=$(awk '$1 ~ /^bindcmdaddress$/ {print $2; exit 1}' /etc/chrony/chrony.conf \ +&& echo 127.0.0.1) +CMDPORT=$(awk '$1 ~ /^cmdport$/ {print $2; exit 1}' /etc/chrony/chrony.conf \ +&& echo 323) +KEY=$(awk '$1 ~ /^commandkey$/ {print $2; exit}' /etc/chrony/chrony.conf) PASSWORD=`awk '$1 ~ /^'$KEY'$/ {print $2; exit}' /etc/chrony/chrony.keys` -/usr/bin/chronyc << EOF +/usr/bin/chronyc -h $CMDADDRESS -p $CMDPORT << EOF password $PASSWORD online burst 5/10 diff -Nru chrony-2.1.1_IPROUTE2/debian/init chrony-2.1.1_CMDADDRPORT/debian/init --- chrony-2.1.1_IPROUTE2/debian/init 2016-03-14 21:54:22.769482228 +0100 +++ chrony-2.1.1_CMDADDRPORT/debian/init 2016-03-14 20:49:51.223347247 +0100 @@ -33,10 +33,14 @@ || timelimit -q -s9 -t5 -- ip route list 0/0 >/dev/null then sleep 2 # Chronyd can take a while to start. - KEY=$(awk '$1 ~ /^commandkey$/ { print $2; exit}' /etc/chrony/chrony.conf) + CMDADDRESS=$(awk '$1 ~ /^bindcmdaddress$/ {print $2; exit 1}' /etc/chrony/chrony.conf \ + && echo 127.0.0.1) + CMDPORT=$(awk '$1 ~ /^cmdport$/ {print $2; exit 1}' /etc/chrony/chrony.conf \ + && echo 323) + KEY=$(awk '$1 ~ /^commandkey$/ {print $2; exit}' /etc/chrony/chrony.conf) PASSWORD=`awk '$1 ~ /^'$KEY'$/ {print $2; exit}' /etc/chrony/chrony.keys` # Make sure chronyc can't hang us up. - if timelimit -q -s9 -t5 -- /usr/bin/chronyc > /dev/null << EOF + if timelimit -q -s9 -t5 -- /usr/bin/chronyc -h $CMDADDRESS -p $CMDPORT > /dev/null << EOF password $PASSWORD online burst 5/10