Package: chrony
Version: 1.21z-3
Severity: wishlist
Tags: patch
/etc/ppp/ip-{up,down}.d/chrony exist but /etc/network/if-{up,down}.d/chrony
don't; I assume this is because it assumed that only PPP interfaces can be
transient, but this is not the case: think about someone taking their work
laptop home, or their home laptop to work, etc.
I suggest that the /etc/ppp/ip-up.d/chrony script is patched with:
*** chrony.orig 2006-09-28 18:09:19.000000000 +0200
--- chrony 2006-09-28 18:15:11.000000000 +0200
***************
*** 5,10 ****
--- 5,14 ----
# were in the public domain. I waive all rights.
/bin/pidof chronyd > /dev/null || exit 0
+ # ensure not called twice by ifup/ifdown *and* pppd for the same event.
+ ! expr "$IFACE" : ppp > /dev/null || [ "X$IFNAME" != X ] || exit 0
+ # don't do anything if we don't have a route to internet.
+ netstat -nr | grep -q '^0\.0\.0\.0 ' || exit 0
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
and that the /etc/ppp/ip-down.d/chrony script is patched with:
*** chrony.orig 2006-09-28 18:16:39.000000000 +0200
--- chrony 2006-09-28 18:17:32.000000000 +0200
***************
*** 6,12 ****
# were in the public domain. I waive all rights.
/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)
PASSWORD=`awk '$1 ~ /^'$KEY'$/ {print $2; exit}' /etc/chrony/chrony.keys`
--- 6,15 ----
# were in the public domain. I waive all rights.
/bin/pidof chronyd > /dev/null || exit 0
! # ensure not called twice by ifup/ifdown *and* pppd for the same event.
! ! expr "$IFACE" : ppp > /dev/null || [ "X$IFNAME" != X ] || exit 0
! # Don't mark the connection offline unless we know the corresponding 'up'
! # script brought it up.
test -e /var/run/chrony-ppp-up || exit 0
KEY=$(awk '$1 ~ /^commandkey$/ { print $2; exit}' /etc/chrony/chrony.conf)
PASSWORD=`awk '$1 ~ /^'$KEY'$/ {print $2; exit}' /etc/chrony/chrony.keys`
and that hardlinks to /etc/ppp/ip-{up,down}.d/chrony are made from
/etc/network/if-{up,down}.d/chrony (respectively, obviously :-).
If I can be of any further assistance please let me know.
Regards and thanks for packaging chrony!
Alexis Huxley
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-686
Locale: LANG=C, LC_CTYPE=C (charmap=ISO-8859-1) (ignored: LC_ALL set to en_GB)
Versions of packages chrony depends on:
ii libc6 2.3.6.ds1-4 GNU C Library: Shared libraries
ii libncurses5 5.5-2 Shared libraries for terminal hand
ii libreadline5 5.1-7 GNU readline and history libraries
ii ucf 2.0014 Update Configuration File: preserv
chrony recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]