Package: isc-dhcp-client
Version: 4.2.4-7
Severity: wishlist

Hi,

It seems that there is no easy way to reload a running dhclient's
config file. A SIGHUP will cause it to die, dhclient -r will cause it
to release the lease and quit. I would like to make a change to the
enter-hooks.d and restart dhclient, but the only way I can find to do
it is some nasty thing like this:

PIDFILE=/var/run/dhclient.eth0.pid

dhclient=`/bin/ps --no-headers --pid $(cat $PIDFILE) -f | /usr/bin/awk 
'{for(i=8;i<=NF;++i) printf("%s ",  $i) }'`
/usr/bin/pkill -F $PIDFILE
$dhclient

If there is a nicer way to do this, I would love to know!
thanks!
micah

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.9-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages isc-dhcp-client depends on:
ii  debianutils      4.3.4
ii  iproute          1:3.9.0-3
ii  isc-dhcp-common  4.2.4-7
ii  libc6            2.17-5

isc-dhcp-client recommends no packages.

Versions of packages isc-dhcp-client suggests:
ii  avahi-autoipd  0.6.31-2
pn  resolvconf     <none>

-- Configuration Files:
/etc/dhcp/dhclient-enter-hooks.d/debug changed:
RUN="yes"
if [ "$RUN" = "yes" ]; then
        echo $(date): entering ${0%/*}, dumping variables. \
                >> /tmp/dhclient-script.debug
        # loop over the 4 possible prefixes: (empty), cur_, new_, old_
        for prefix in '' 'cur_' 'new_' 'old_'; do
                # loop over the DHCP variables passed to dhclient-script
                for basevar in reason interface medium alias_ip_address \
                               ip_address host_name network_number subnet_mask \
                               broadcast_address routers static_routes \
                               rfc3442_classless_static_routes \
                               domain_name domain_search domain_name_servers \
                               netbios_name_servers netbios_scope \
                               ntp_servers \
                               ip6_address ip6_prefix ip6_prefixlen \
                               dhcp6_domain_search dhcp6_name_servers ; do
                        var="${prefix}${basevar}"
                        # show only variables with values set
                        if [ -n "${!var}" ]; then
                                echo "$var='${!var}'" >> 
/tmp/dhclient-script.debug
                        fi
                done
        done
        echo '--------------------------' >> /tmp/dhclient-script.debug
fi


-- no debconf information


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to