dhclient-exit-hooks weirdness

From: Reid Linnemann <lreid_at_cs.okstate.edu>
Date: Fri, 15 Jul 2005 08:03:45 -0500 (CDT)
I'm using dhclient-script 1.4, and the following dhclient-exit-hooks
that worked prior to the OpenBSD dhclient import:

#!/bin/sh
PATH=/bin:/sbin:/usr/bin
if [ x$new_host_name != x ]; then
  if [ x$new_domain_name != x ]; then
    hostname $new_host_name.$new_domain_name
    echo New Hostname: $new_host_name.$new_domain_name
  else
    hostname $new_host_name
    echo New Hostname: $new_host_name
  fi
else
  hostname=`/usr/local/bin/resolveip -s $new_ip_address`
  hostname $hostname
  echo New Hostname: $hostname
fi

When dhclient starts on the interface (rl0) during system boot,
dhclient-exit-hooks is invoked before dhclient reports it has even
recieved a DHCPACK, and the console is cluttered with resolveip's usage
message. $new_ip_address is empty when dhclient-exit-hooks is invoked,
and the hostname of the system remains bogus. Is anyone else having
similar trouble? Is my dhclient-exit-hooks actually sane?

Thanks,
Reid
Received on Fri Jul 15 2005 - 11:03:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:38 UTC