diff options
-rw-r--r-- | bin/csh/Makefile | 4 | ||||
-rw-r--r-- | contrib/isc-dhcp/includes/cf/freebsd.h | 12 | ||||
-rw-r--r-- | sbin/dhclient/Makefile | 3 | ||||
-rw-r--r-- | sbin/dhclient/client/Makefile | 7 |
4 files changed, 24 insertions, 2 deletions
diff --git a/bin/csh/Makefile b/bin/csh/Makefile index 228125d..64def18 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -10,7 +10,11 @@ TCSHDIR= ${.CURDIR}/../../contrib/tcsh .PATH: ${TCSHDIR} PROG= csh +.if defined(RESCUE) +DFLAGS= -D_PATH_TCSHELL='"/rescue/${PROG}"' +.else DFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"' +.endif CFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS} WARNS= 2 SRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ diff --git a/contrib/isc-dhcp/includes/cf/freebsd.h b/contrib/isc-dhcp/includes/cf/freebsd.h index eefbce3..db15c30 100644 --- a/contrib/isc-dhcp/includes/cf/freebsd.h +++ b/contrib/isc-dhcp/includes/cf/freebsd.h @@ -103,6 +103,10 @@ extern int h_errno; #define SOCKLEN_T int #endif +#ifdef RESCUE +#define _PATH_DHCLIENT_SCRIPT "/rescue/dhclient-script" +#endif + #if defined (USE_DEFAULT_NETWORK) # define USE_BPF #endif @@ -113,6 +117,9 @@ extern int h_errno; #endif /* HAVE_DEV_RANDOM */ const char *cmds[] = { +#ifndef RESCUE + /* rescue environment can't rely on these ... */ + /* Actually, /sbin/dhclient shouldn't use these, either. */ "/bin/ps -axlw 2>&1", "/usr/sbin/arp -an 2>&1", "/usr/bin/netstat -an 2>&1", @@ -123,10 +130,12 @@ const char *cmds[] = { "/usr/sbin/iostat 2>&1", "/usr/bin/vmstat 2>&1", "/usr/bin/w 2>&1", +#endif NULL }; const char *dirs[] = { +#ifndef RESCUE "/tmp", "/usr/tmp", ".", @@ -136,13 +145,16 @@ const char *dirs[] = { "/var/mail", "/home", "/usr/home", +#endif NULL }; const char *files[] = { +#ifndef RESCUE "/var/log/messages", "/var/log/wtmp", "/var/log/lastlog", +#endif NULL }; #endif /* NEED_PRAND_CONF */ diff --git a/sbin/dhclient/Makefile b/sbin/dhclient/Makefile index 9f2384f..372adfd 100644 --- a/sbin/dhclient/Makefile +++ b/sbin/dhclient/Makefile @@ -52,8 +52,9 @@ OBJS+= dhcpctl/dhcpctl.o dhcpctl/callback.o dhcpctl/remote.o # though, so we must run ``make all'' instead when we are asked to # generate an individual object file. +# Note: Must have some commands here to override the default build action ${OBJS}: all - + @true .endif .include <bsd.subdir.mk> diff --git a/sbin/dhclient/client/Makefile b/sbin/dhclient/client/Makefile index f4a609d..c82c912 100644 --- a/sbin/dhclient/client/Makefile +++ b/sbin/dhclient/client/Makefile @@ -8,7 +8,12 @@ DIST_DIR= ${.CURDIR}/../../../contrib/isc-dhcp PROG= dhclient SRCS= clparse.c dhclient.c -CFLAGS+= -DCLIENT_PATH='"PATH=/sbin:/bin:/usr/sbin:/usr/bin"' -Dwarn=dhcp_warn +.if defined(RESCUE) +CFLAGS+= -DCLIENT_PATH='"PATH=/rescue:/sbin:/bin:/usr/sbin:/usr/bin"' +.else +CFLAGS+= -DCLIENT_PATH='"PATH=/sbin:/bin:/usr/sbin:/usr/bin"' +.endif +CFLAGS+= -Dwarn=dhcp_warn DPADD= ${LIBDHCP} ${LIBRES} ${LIBOMAPI} ${LIBDST} LDADD= ${LIBDHCP} ${LIBRES} ${LIBOMAPI} ${LIBDST} |