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>
This commit is contained in:
jkh 1999-07-16 09:26:53 +00:00
parent ec6dad014e
commit 62a15a73f5
8 changed files with 52 additions and 15 deletions

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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