summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1999-07-16 09:26:53 +0000
committerjkh <jkh@FreeBSD.org>1999-07-16 09:26:53 +0000
commit62a15a73f51b97c0ffc57c2da9aaa25cffb8cc07 (patch)
treecdafd92b3e7a8128c1badb6fdfdc15140b38c60e /etc
parentec6dad014ee58e3cd813572d2eecefe91e996917 (diff)
downloadFreeBSD-src-62a15a73f51b97c0ffc57c2da9aaa25cffb8cc07.zip
FreeBSD-src-62a15a73f51b97c0ffc57c2da9aaa25cffb8cc07.tar.gz
Allow DHCP to be used in an ifconfig variable instead of the usual
address information, producing the obvious effect (dhcp configuration). Submitted by: "Sean O'Connell" <sean@stat.Duke.EDU>
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/rc.conf4
-rw-r--r--etc/network.subr9
-rw-r--r--etc/rc.d/netoptions9
-rw-r--r--etc/rc.d/network19
-rw-r--r--etc/rc.d/network29
-rw-r--r--etc/rc.d/network39
-rw-r--r--etc/rc.d/routing9
-rw-r--r--etc/rc.network9
8 files changed, 52 insertions, 15 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index d1c17c3..3f53242 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -9,7 +9,7 @@
#
# All arguments must be in double or single quotes.
#
-# $Id: rc.conf,v 1.19 1999/07/11 04:05:34 iwasaki Exp $
+# $Id: rc.conf,v 1.20 1999/07/12 17:20:22 iwasaki Exp $
##############################################################
### Important initial Boot-time options ####################
@@ -35,6 +35,8 @@ rc_conf_files="/etc/rc.conf /etc/rc.conf.local"
### Basic network options: ###
hostname="myname.my.domain" # Set this!
nisdomainname="NO" # Set to NIS domain if using NIS (or NO).
+dhcp_program="/sbin/dhclient" # Path to dhcp client program.
+dhcp_flags="" # Additional flags to pass to dhcp client.
firewall_enable="NO" # Set to YES to enable firewall functionality
firewall_script="/etc/rc.firewall" # Which script to run to set up the firewall
firewall_type="UNKNOWN" # Firewall type (see /etc/rc.firewall)
diff --git a/etc/network.subr b/etc/network.subr
index 63b8a32..d0eec1a 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.48 1999/07/07 12:49:45 peter Exp $
+# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -63,7 +63,12 @@ network_pass1() {
# Do the primary ifconfig if specified
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
- ifconfig ${ifn} ${ifconfig_args}
+ # See if we are using DHCP
+ if [ X"${ifconfig_args}" = X"DHCP" ]; then
+ ${dhcp_program} ${dhcp_flags} ${ifn}
+ else
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
showstat=true
fi
# Check to see if aliases need to be added
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions
index 63b8a32..d0eec1a 100644
--- a/etc/rc.d/netoptions
+++ b/etc/rc.d/netoptions
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.48 1999/07/07 12:49:45 peter Exp $
+# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -63,7 +63,12 @@ network_pass1() {
# Do the primary ifconfig if specified
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
- ifconfig ${ifn} ${ifconfig_args}
+ # See if we are using DHCP
+ if [ X"${ifconfig_args}" = X"DHCP" ]; then
+ ${dhcp_program} ${dhcp_flags} ${ifn}
+ else
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
showstat=true
fi
# Check to see if aliases need to be added
diff --git a/etc/rc.d/network1 b/etc/rc.d/network1
index 63b8a32..d0eec1a 100644
--- a/etc/rc.d/network1
+++ b/etc/rc.d/network1
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.48 1999/07/07 12:49:45 peter Exp $
+# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -63,7 +63,12 @@ network_pass1() {
# Do the primary ifconfig if specified
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
- ifconfig ${ifn} ${ifconfig_args}
+ # See if we are using DHCP
+ if [ X"${ifconfig_args}" = X"DHCP" ]; then
+ ${dhcp_program} ${dhcp_flags} ${ifn}
+ else
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
showstat=true
fi
# Check to see if aliases need to be added
diff --git a/etc/rc.d/network2 b/etc/rc.d/network2
index 63b8a32..d0eec1a 100644
--- a/etc/rc.d/network2
+++ b/etc/rc.d/network2
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.48 1999/07/07 12:49:45 peter Exp $
+# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -63,7 +63,12 @@ network_pass1() {
# Do the primary ifconfig if specified
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
- ifconfig ${ifn} ${ifconfig_args}
+ # See if we are using DHCP
+ if [ X"${ifconfig_args}" = X"DHCP" ]; then
+ ${dhcp_program} ${dhcp_flags} ${ifn}
+ else
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
showstat=true
fi
# Check to see if aliases need to be added
diff --git a/etc/rc.d/network3 b/etc/rc.d/network3
index 63b8a32..d0eec1a 100644
--- a/etc/rc.d/network3
+++ b/etc/rc.d/network3
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.48 1999/07/07 12:49:45 peter Exp $
+# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -63,7 +63,12 @@ network_pass1() {
# Do the primary ifconfig if specified
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
- ifconfig ${ifn} ${ifconfig_args}
+ # See if we are using DHCP
+ if [ X"${ifconfig_args}" = X"DHCP" ]; then
+ ${dhcp_program} ${dhcp_flags} ${ifn}
+ else
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
showstat=true
fi
# Check to see if aliases need to be added
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index 63b8a32..d0eec1a 100644
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.48 1999/07/07 12:49:45 peter Exp $
+# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -63,7 +63,12 @@ network_pass1() {
# Do the primary ifconfig if specified
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
- ifconfig ${ifn} ${ifconfig_args}
+ # See if we are using DHCP
+ if [ X"${ifconfig_args}" = X"DHCP" ]; then
+ ${dhcp_program} ${dhcp_flags} ${ifn}
+ else
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
showstat=true
fi
# Check to see if aliases need to be added
diff --git a/etc/rc.network b/etc/rc.network
index 63b8a32..d0eec1a 100644
--- a/etc/rc.network
+++ b/etc/rc.network
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.48 1999/07/07 12:49:45 peter Exp $
+# $Id: rc.network,v 1.49 1999/07/08 18:56:02 peter Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -63,7 +63,12 @@ network_pass1() {
# Do the primary ifconfig if specified
eval ifconfig_args=\$ifconfig_${ifn}
if [ -n "${ifconfig_args}" ] ; then
- ifconfig ${ifn} ${ifconfig_args}
+ # See if we are using DHCP
+ if [ X"${ifconfig_args}" = X"DHCP" ]; then
+ ${dhcp_program} ${dhcp_flags} ${ifn}
+ else
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
showstat=true
fi
# Check to see if aliases need to be added
OpenPOWER on IntegriCloud