Commit Graph

38 Commits

Author SHA1 Message Date
Brad Davis
62e23a4781 Move dhclient.conf to sbin/dhclient/.
This also leverages CONFS for handling config files.

Approved by:	re (gjb), will (mentor)
Differential Revision:	https://reviews.freebsd.org/D17160
2018-09-18 00:11:45 +00:00
Ed Maste
2c208ed867 Allow dhclient and ping to build WITHOUT_DYNAMICROOT
dhclient and ping normally use libcasper services.  These are not
available in statically-linked binaries, so when WITHOUT_DYNAMICROOT is
set disable libcasper use, as with rescue builds.  Also emit a warning
as it's undesirable to build this way.

Reported by:	Michael Dexter
Reviewed by:	rgrimes
Tested by:	Michael Dexter
Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17074
2018-09-09 17:26:44 +00:00
Eitan Adler
71c6c44d8d dhclient: build with WARNS=6
- add static in a number of places
- initialize __progname rather than rely on magical extern values
- use nitems() instead of manually spelling it out
- unshadow 'idi'
- teach 'error' that it is '__dead2'
- add missing 'break'
2018-06-24 13:23:27 +00:00
Alan Somers
79a1d19516 dhclient: raise WARNS to 4
Mostly const-correctness fixes. There were also some variable-shadowing,
unused variable, and a couple of sockaddr type-correctness changes. I also had
trouble with cast-align warnings. I was able to prove that one of them was a
false positive. But ultimately I had to disable the warning program-wide to
deal with the others.

Reviewed by:	cem
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D14460
2018-02-21 21:13:08 +00:00
Alan Somers
afe6f8358e dhclient(8): raise WARNS to 3
Mostly had to fix a lot of signed/unsigned comparison warnings

MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
2017-12-14 15:41:32 +00:00
Mariusz Zaborski
cb003dd918 Use syslog service in dhclient(8).
dhclient(8) is failing during boot to connect to the syslog service, because
syslog daemon is started after dhclient(8). This can be reproduced by stooping
syslog daemon and ktrace the dhclient or use kern.trap_enotcap sysctl and boot
the machine. Using the Casper syslog service fix the problem.

Reviewed by:	bapt@
Differential Revision:	https://reviews.freebsd.org/D12825
2017-11-12 08:42:43 +00:00
Enji Cooper
d511b20a69 Add HAS_TESTS to all Makefiles that are currently using the
`SUBDIR.${MK_TESTS}+= tests` idiom.

This is a follow up to r321912.
2017-08-02 08:50:42 +00:00
Enji Cooper
4b330699f8 Convert traditional ${MK_TESTS} conditional idiom for including test
directories to SUBDIR.${MK_TESTS} idiom

This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .

No functional change intended.

MFC after:	1 weeks
2017-08-02 08:35:51 +00:00
Glen Barber
406d87b1c3 Explicitly add more files to the 'runtime' package.
Sponsored by:	The FreeBSD Foundation
2016-02-09 20:19:31 +00:00
Baptiste Daroussin
13eb765f2d Convert sbin/ to LIBADD
Reduce overlinking
2014-11-25 11:23:12 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Julio Merino
c68de7484a Migrate tools/regression/sbin/ to the new tests layout.
Pretty much all that this change does is shuffles the code around and hooks
it into the regular build.  The code of the old tests has not changed.
2014-03-16 02:07:08 +00:00
Dag-Erling Smørgrav
23f39c906b 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
2011-10-13 17:20:45 +00:00
Ruslan Ermilov
106d839190 Switch the default WARNS level for sbin/ to 6.
Submitted by:	Ulrich Spörlein
2009-10-19 16:00:24 +00:00
Ruslan Ermilov
f9ba39e985 Install the dhcp-options.5 manpage.
Timeout from:	brooks
Approved by:	re (blanket manpages)
2005-06-25 11:03:06 +00:00
Ruslan Ermilov
c55cd9092d - Remove OpenBSD'ism (bsd.own.mk).
- Remove redundant and harmful -Wall from CFLAGS.
2005-06-07 09:32:23 +00:00
Brooks Davis
43c56a9bd9 Use SCRIPTS to install dhclient-script instead of rolling our own. 2005-06-07 04:35:48 +00:00
Brooks Davis
955cf67bf4 Take the OpenBSD version of the Makefile to resolve conflicts as the old
one is irrelevent.  Add $FreeBSD.
2005-06-07 04:08:50 +00:00
Gordon Tetlow
6d1b4a4730 Tweak a couple of utilities so they compile cleanly for /rescue. Mostly
path fixes.

Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-29 18:46:18 +00:00
Matthew N. Dodd
7ff910a94b Hook omshell(1) up to the build. 2003-03-25 03:16:53 +00:00
Matthew N. Dodd
a47e79711b Building crunched things by hand (regenerating boot floppies for example)
without a full make release cycle fails as the correct include path
isn't setup.
2003-03-25 03:13:57 +00:00
Makoto Matsushita
0ed8a30f62 Fix "make release.4" breakage.
src/contrib/isc-dhcp/includes/minires/resolv.h has a 'extern' definition
but it makes an error when linking crunched binary just like this:

	dhclient.lo: In function `MRres_nquery':
	dhclient.lo(.text+0x2dcce): undefined reference to `__h_errno_set'
	dhclient.lo(.text+0x2dd5b): undefined reference to `__h_errno_set'
	dhclient.lo: In function `MRres_nquerydomain':
	dhclient.lo(.text+0x2de53): undefined reference to `__h_errno_set'

The author understands this will be a problem (see comments in resolv.h).
Murray said that the author will fix this, but as a temporary solution,
modifying the source code and not to use __h_errno_set.

BTW, I'm sorry that previous commitlog in src/sbin/dhclient/Makefile should
read "Found by:" instead of "Confirmed by"; I just found that rev 1.15
has a typo so fixed.

Tested on: ushi.jp.FreeBSD.org with today's 5-current source code.
           (belive me, "make release.4" works fine now)
2002-02-28 16:17:18 +00:00
Makoto Matsushita
226e3b6ec6 For unbraking "make release": s/client/common/g
(these files are sitting in src/contrib/isc-dhcp/common, not .../client.)

Confirmed by: 5.0-CURRENT-20020228-JPSNAP at snapshots.jp.FreeBSD.org
2002-02-28 00:02:33 +00:00
Murray Stokely
d52ccfe321 Add some ifdef(RELEASE_CRUNCH) goo to explicitly list the requisite
object files for crunchgen.  Without this patch, release.4 will fail
to build the crunched binaries for the release floppies.
2002-02-26 15:12:54 +00:00
Murray Stokely
0829ba2c77 Makefile glue for DHCP v3 import. 2002-02-19 12:57:18 +00:00
David E. O'Brien
2d68bf45bf Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
Ruslan Ermilov
b9ad8c8635 beforeinstall -> SCRIPTS. 2001-04-07 11:21:35 +00:00
Ruslan Ermilov
0a5779d45b - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
Jacques Vidrine
248aee623c Add nsswitch support. By creating an /etc/nsswitch.conf file, you can
configure FreeBSD so that various databases such as passwd and group can be
looked up using flat files, NIS, or Hesiod.

= Hesiod has been added to libc (see hesiod(3)).

= A library routine for parsing nsswitch.conf and invoking callback
  functions as specified has been added to libc (see nsdispatch(3)).

= The following C library functions have been modified to use nsdispatch:
    . getgrent, getgrnam, getgrgid
    . getpwent, getpwnam, getpwuid
    . getusershell
    . getaddrinfo
    . gethostbyname, gethostbyname2, gethostbyaddr
    . getnetbyname, getnetbyaddr
    . getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr

= host.conf has been removed from src/etc.  rc.network has been modified
  to warn that host.conf is no longer used at boot time.  In addition, if
  there is a host.conf but no nsswitch.conf, the latter is created at boot
  time from the former.

Obtained from:	NetBSD
2000-09-06 18:16:48 +00:00
David E. O'Brien
f063845519 Blah, need to add /usr/bin to the path also.
Of course this is a bug in that the dhclient script will not work properly
if one has a local / and an NFS mounted /usr and needs to obtain its IP
address via DHCP before being able to mount /usr.
2000-07-21 19:08:22 +00:00
David E. O'Brien
fbb0d22951 Need /usr/sbin for arp(8). 2000-07-20 10:29:52 +00:00
David E. O'Brien
a3b867b670 Patchlevel 3 of the ISC 2.0 dhcp client now requires us to give it the
shell script's PATH setting in the environment.
2000-07-20 10:11:22 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
David E. O'Brien
d7f6c914c9 Add new file that needs compiling. 1999-06-24 08:13:21 +00:00
Bruce Evans
3e3aea1728 Install dhclient-script under ${DESTDIR}.
PR:		10615, 10891
1999-04-03 07:09:59 +00:00
David E. O'Brien
2a3a31d8ca More style fixes to bring this almost to bde's suggested version. 1999-02-18 18:56:58 +00:00
David E. O'Brien
a20d7fd0c0 bde suggests not to trust ${COPY} to always be defined.
also fix style bugs submitted by Bruce
1999-02-18 09:38:18 +00:00
David E. O'Brien
914345e310 bmake framework for ISC-DHCP client 1999-02-10 20:51:22 +00:00