History log of /freebsd-11-stable/etc/rc.d/dhclient
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 301068 31-May-2016 vangyzen

Fix indentation in dhclient rc.d script


# 298514 23-Apr-2016 lme

- Add descriptions to most of the rc scripts. Those are mostly taken from their
daemon's manpage and probably improved.
- Consistently use "filesystem" not "file system".

Approved by: bapt, brueffer
Differential Revision: D452


# 230388 20-Jan-2012 rea

dhclient: don't use syslog for logging non-DHCP interface errors

We should show the error to user, but it doesn't deserve syslog.

Approved by: jhb


# 230007 12-Jan-2012 rea

rc.d: document 'quiet' prefix and fix dhclient/devd interaction

Document the current semantics of the 'quiet' command prefix
in the rc.subr(8).

Fix dhclient rc.d script: it should not call err() for
non-DHCP-enabled interface when it is called from devd, because the
latter just blindly calls 'service dhclient quietstart' on each "link
up" event.

Since the 'quietstart' will silence the message "Cannot 'start' <foo>.
Set <foo>_enable to YES in /etc/rc.conf or use 'onestart' instead of
'start'." and running dhclient on the non-DHCP-enabled interface is
the same thing as running the service <foo> without <foo>_enable set,
such modification is in sync with the current semantics of the 'quiet'
prefix.

Approved by: glebius
Reviewed by: freebsd-rc list
MFC after: 2 weeks


# 226879 28-Oct-2011 rea

Fix handling of rc_force in /etc/rc.d/dhclient

Variable 'rc_force' is accessible only at the time of rc_run_command,
so it can't be examined from the script's main code.

Spotted by: hrs
Reviewed by: hrs, des
Approved by: des
MFC after: 2 weeks


# 226464 17-Oct-2011 des

The rc_force test was inverted in the previous commit, so that dhclient ran
for interfaces which were not configured for DHCP *unless* rc_force was set;
the correct logic is to run dhclient for those interfaces *only if* rc_force
is set.

Broken by: des@
Noticed by: everybody and his dog
Submitted by: rea@
PR: bin/161733


# 226345 13-Oct-2011 des

Make dhclient use a pid file. Modify the rc script accordingly; while
there, clean it up and add some error checks.

Glanced at by: brooks@
MFC after: 3 weeks


# 178233 15-Apr-2008 brooks

Add very limited support for the isc-dhclient. It will almostly certaintly
only work if there's just one interface doing dhcp. This version implements
the same logic as the version in the PR, but uses pgrep to be less verbose.

PR: conf/95905
MFC after: 1 week


# 175879 01-Feb-2008 brooks

When the state of the interface changes rapidly enough (usually due to
rapid wireless association changes in my experience), there is a race
where dhclient is in the process of exiting due to the link going down
when the link coming up causes devd to try and start a new one. This
results is the link being up, but no dhclient running.

Work around this race by checking a second time after a one second delay
before refusing to start a dhclient instance due to one already being
running.

MFC after: 1 week


# 174458 08-Dec-2007 dougb

Remove spurious # marks to be more consistent with existing style.


# 174438 08-Dec-2007 dougb

Remove $NetBSD$ CVS tags. We no longer attempt to synch our rc.d files
with theirs, so this information doesn't need to be in the live file.
Having it in our CVS history is enough.


# 167881 25-Mar-2007 mtm

Having gone to the trouble of setting up a variable, we should use it.


# 167181 02-Mar-2007 brooks

Use get_if_var() to retrieve interface specific values of dhclient_flags
and background_dhclient. This allows interfaces who's names are not
valid parts of shell variables and shortens the code.

MFC after: 1 week


# 166740 15-Feb-2007 yar

pkill(1) and pgrep(1) have been moved to /bin so that they are
available to rc.d scripts early in the boot sequence.


# 162972 02-Oct-2006 brooks

Pull in /etc/rc.conf.d/network so that ifconfig_<if> variables can be
set there. This is required for consistency with /etc/rc.d/netif.

PR: conf/103893
Submitted by: Nick Hibma <nick at anywi.com>
MFC after: 3 days


# 161415 17-Aug-2006 brian

Add a missing quote

Spotted by: ru


# 161410 17-Aug-2006 brian

Add a -p switch to dhclient. The switch tells dhclient to persist
despite the interface link status.

Add dhclient_flags_iface and background_dhclient_iface rc.conf options.
(where iface is a specific interface). These can be used to give
interface specific flags to dhclient.

Reviewed by: brooks@


# 160197 09-Jul-2006 stefanf

Fix spelling in a comment.


# 148415 25-Jul-2005 brooks

Silence the de-bouncing of dhclient start up. The previous output
caused significant mental anguish for some portions of the user
population. :)


# 147704 30-Jun-2005 brooks

Remove REQUIRE and BEFORE lines since this script is not run by rcorder
at startup. Instead it is called by other scripts.

Approved by: re (network interface startup blanket)


# 147088 07-Jun-2005 brooks

Support code for the OpenBSD dhclient. This significantly changes the
way interfaces are configured. Some key points:

- At startup, all interfaces are configured through /etc/rc.d/netif.
- ifconfig_<if> variables my now mix real ifconfig commands the with
DHCP and WPA directives. For example, this allows media
configuration prior to running dhclient.
- /etc/rc.d/dhclient is not run at startup except by netif to start
dhclient on specific interfaces.
- /etc/pccard_ether calls "/etc/rc.d/netif start <if>" to do most of
it's work.
- /etc/pccard_ether no longer takes additional arguments to pass to
ifconfig. Instead, ifconfig_<if> variables are now honored in favor
of pccard_ifconfig when available.
- /etc/pccard_ether will only run on interfaces specified in
removable_interfaces, even if pccard_ifconfig is set.


# 140339 16-Jan-2005 obrien

"REQUIRE: cleanvar" for all RC's writing into /var/run.


# 136224 07-Oct-2004 mtm

Remove the requirement for the FreeBSD keyword as it no longer
makes any sense.

Discussed with: dougb, brooks
MFC after: 3 days


# 129492 20-May-2004 mtm

The err routine requires two arguments: an exit value and a string.
Additionaly, it will exit the script so an return statements after
calling it are superflous.


# 126744 08-Mar-2004 pjd

Mark scripts as not usable inside a jail by adding keyword 'nojail'.

Some suggestions from: rwatson, Ruben de Groot <mail25@bzerk.org>


# 126636 05-Mar-2004 mtm

Remove scripts we don't use from requirement lines. These were
hold-overs from the initial NetBSD import.


# 126392 28-Feb-2004 green

Further shuffle runcom ordering so that netif does not start before
ipfw, but ipfw and ipfilter do start before dhclient.


# 124618 17-Jan-2004 mtm

Luke Mewburn has indicated that they (NetBSD) are not interested
in keeping the scripts under rc.d in sync with us. So, remove
NetBSD specific stuff (which made our scripts more complicated
than necessary).

The NetBSD ident string will be left intact, both for history and
also incase we wish to pull in future versions.


# 124616 17-Jan-2004 mtm

Luke Mewburn has indicated that they (NetBSD) are not interested
in keeping the scripts under rc.d in sync with us. So, begin removal
of NetBSD specific stuff (which made our scripts more complicated
than necessary), starting with the NetBSD KEYWORD.


# 120110 16-Sep-2003 mbr

Get rid of a nasty error message that tells us
dhclient couldn't get killed.

If we execute 'dhclient -r', dhclient gets already
killed, so there is no need to do it twice. Only do
this if we really have to release some leases.

Reviewed by: silence on freebsd-rc@yahoogroups.com


# 118108 28-Jul-2003 mbr

Always start dhclient in the background.

Reviewed by: mtm


# 118067 26-Jul-2003 mtm

Define the stop command to do nothing when only a specific
interface is to be stopped. In this case we don't want to go
beyond releasing the lease.


# 118066 26-Jul-2003 mtm

When stopping a dhcp interface, don't just release the lease on
the address, also kill the dhclient process. Instead of doing the
release in the stop command, move it to the precmd stage and allow
rc.subr(8) to automatically kill the dhclient process by leaving the
stop command undefined.

Noticed by: mbr


# 117021 29-Jun-2003 mtm

Implement individual operations on static and dhcp interfaces. Previously
network interfaces could only be turned on and off as a group (all
static interfaces or all dhcp interfaces).

When used to start the interface a 'long form' ifconfig output is
used to show the status of the interface, but when stopping an interface
the script will simply output the name of the interface. This is simply my
personal preference. Hopefully as this functionality matures we can
stabilize on a prefered form of output for these scripts.

A stop command to the dhclient script now explicitly releases the dhcp lease.
Behaviour at system shutdown; however, is unchanged since dhclient is not,
by default, run at that time. The client will not release its lease
at shutdown.


# 115950 07-Jun-2003 mtm

The dhcp_program and dhcp_flags variables have to be renamed to
take advantage of the rc.subr(8) glue. They are renamed dhclient_program
and dhclient_flags.
o Rename them in rc.conf(5)
o Rename them in /etc/defaults/rc.conf
o Add the deprecated variables to /etc/rc.subr
o Isolate the use of the 'command' variable to the
NetBSD specific parts in /etc/rc.d/dhclient.
o Now that dhcp_flags has also been renamed it will
be applied properly by rc.subr(8) glue code.

Reported by: John Nielsen <john@jnielsen.net>


# 113759 20-Apr-2003 mtm

Run interface specific scripts for dhcp interfaces too.
This is how it has always been done (before and after rc.d) but
I somehow failed to include it when I broke up network1.

Submitted by: bmah
Approved by: markm (mentor)(implicit)


# 113675 18-Apr-2003 mtm

Make use of the dhclient script. This will bring up/down dhcp
interfaces.

Approved by: markm (mentor)


# 98184 13-Jun-2002 gordon

Merge in all the changes that Mike Makonnen has been maintaining for a
while. This is only the script pieces, the glue for the build comes next.

Submitted by: Mike Makonnen <makonnen@pacbell.net>
Reviewed by: silence on -current and -hackers
Prodded by: rwatson


# 78345 16-Jun-2001 obrien

This commit was generated by cvs2svn to compensate for changes in r78344,
which included commits to RCS files with non-trunk default branches.


# 78344 16-Jun-2001 obrien

Import the NetBSD 1.5 RC system.

Note that `rc' and `rc.shutdown' could not be imported because we already
have files with those names.