Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] NetBSD dhclient...



>>>>> "Michael" == Michael Doughty <Doughty_Michael@example.com> writes:

    Michael> I have scanned through the dhclient.conf and
    Michael> dhclient-script files seeing nothing that seemed wrong.
    Michael> I even took a shot at rewriting them to explicitly
    Michael> require the nameservers in it's lease, but this didn't do
    Michael> any good.

The Debian linux dhclient-script (originally from NetBSD) contains
this function

make_resolv_conf() {
  echo search $new_domain_name >/etc/resolv.conf
  for nameserver in $new_domain_name_servers; do
    echo nameserver $nameserver >>/etc/resolv.conf
  done
}

and calls it when

if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
   [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
  # lots of config stuff elided #
  make_resolv_conf
  exit_with_hooks 0
fi

or

if [ x$reason = xTIMEOUT ]; then
  # stuff elided #
  ############## what is -w in ping?
  if ping -q -c 1 $1; then
    # stuff elided #
    make_resolv_conf
    exit_with_hooks 0
  fi
  ifconfig $interface inet down
  exit_with_hooks 1
fi

exit_with_hooks 0
# end script #

Look familiar?




-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
              Don't ask how you can "do" free software business;
              ask what your business can "do for" free software.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links