Package: apticron
Version: 1.1.42

$ grep -n hostname /usr/sbin/apticron
85:SYSTEM=`/bin/hostname -f`
105:    IPADDRESSES=`(echo $( /bin/hostname -i ) ;

$ man hostname
-f ...  avoid using this option; use hostname --all-fqdns instead.
-i ...  Avoid using this option; use hostname --all-ip-addresses instead.

Symptom 1: "Subject: 1 Debian package update(s) for localhost"
Symptom 2: "/etc/cron.daily/apticron: hostname: Name or service not known"
(apticron.conf is not applicable - exit error `hostname -f` is before it)

Patch:
-------------------------------
# diff -Naur apticron apticron.new
--- apticron    2010-06-14 11:23:28.000000000 +0600
+++ apticron.new        2011-10-20 15:50:36.000000000 +0600
@@ -82,7 +82,7 @@
 eval `/usr/bin/apt-config shell DIRCACHE Dir::Cache`

 # Set the SYSTEM
-SYSTEM=`/bin/hostname -f`
+SYSTEM=`/bin/hostname -A`

 # Set the IPADDRESSNUM
 IPADDRESSNUM="1"
@@ -102,7 +102,7 @@

 if [ -z "$IPADDRESSES" ]&&  [ -x /sbin/ip ]; then
        # Set the IPv4 addresses
-       IPADDRESSES=`(echo $( /bin/hostname -i ) ;
+       IPADDRESSES=`(echo $( /bin/hostname -I ) ;
                     /sbin/ip -f inet addr show scope global 2>  /dev/null | \
                     /bin/grep "scope global" |\
                     /usr/bin/head -$IPADDRESSNUM |\
-----------------------------------



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to