aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-03-03 21:09:18 +0000
committerBill Nottingham <notting@redhat.com>2005-03-03 21:09:18 +0000
commit178740d76e846a66e044dc270e881bd774b38fd2 (patch)
treea4c780fd5c54aeb3ddffdbd01a0ef27dde0be1de
parente2d4fb9de77b0e2f2dab503b58491ffb2fd04c36 (diff)
downloadinitscripts-178740d76e846a66e044dc270e881bd774b38fd2.tar
initscripts-178740d76e846a66e044dc270e881bd774b38fd2.tar.gz
initscripts-178740d76e846a66e044dc270e881bd774b38fd2.tar.bz2
initscripts-178740d76e846a66e044dc270e881bd774b38fd2.tar.xz
initscripts-178740d76e846a66e044dc270e881bd774b38fd2.zip
woops
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth11
-rwxr-xr-xsysconfig/network-scripts/ifup9
-rwxr-xr-xsysconfig/network-scripts/ifup-eth13
-rw-r--r--sysconfig/network-scripts/network-functions26
4 files changed, 28 insertions, 31 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 83aa7c7a..a9570c01 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -58,12 +58,19 @@ fi;
retcode=0
[ -n "`pidof -x dhclient`" ] && {
if [ -f "/var/run/dhclient-${DEVICE}.pid" ]; then
+ dhcpid=`cat /var/run/dhclient-${DEVICE}.pid`
if [[ "$DHCPRELEASE" = [yY1]* ]]; then
- release_dhcp_lease
+ /sbin/dhclient -r -lf /var/lib/dhcp/dhclient-${DEVICE}.leases -pf /var/run/dhclient-${DEVICE}.pid ${DEVICE} >/dev/null 2>&1
retcode=$?
else
- kill_dhcp_client
+ kill $dhcpid >/dev/null 2>&1
+ retcode=$?
+ reason=STOP interface=${DEVICE} /sbin/dhclient-script
fi
+ if [ -f "/var/run/dhclient-${DEVICE}.pid" ]; then
+ rm -f /var/run/dhclient-${DEVICE}.pid
+ kill $dhcpid >/dev/null 2>&1
+ fi
fi
}
# we can't just delete the configured address because that address
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 57163f09..fc4d9a32 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -119,6 +119,15 @@ if [ -x /sbin/vconfig -a "${VLAN}" = "yes" ]; then
fi
fi
+# Old BOOTP variable
+if [ "${BOOTP}" = "yes" ]; then
+ BOOTPROTO=bootp
+fi
+
+if [ "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ]; then
+ DYNCONFIG=true
+fi
+
if [ -x /sbin/ifup-pre-local ]; then
/sbin/ifup-pre-local ${CONFIG} $2
fi
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index 393a966e..b488d272 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -22,6 +22,15 @@ need_config ${CONFIG}
source_config
+# Old BOOTP variable
+if [ "${BOOTP}" = "yes" ]; then
+ BOOTPROTO=bootp
+fi
+
+if [ "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ]; then
+ DYNCONFIG=true
+fi
+
# load the module associated with that device
# /sbin/modprobe ${REALDEVICE}
is_available ${REALDEVICE}
@@ -134,7 +143,7 @@ if [ -w /etc/dhclient-${DEVICE}.conf ] && [ -x /sbin/dhclient ] ; then
rm -f /etc/dhclient-${DEVICE}.conf.ifupnew
fi
-if [ "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ]; then
+if [ -n "${DYNCONFIG}" ]; then
PUMPARGS=$PUMPARGS
DHCPCDARGS="$DHCPCDARGS -n"
if [[ "${PERSISTENT_DHCLIENT}" = [yY1]* ]]; then
@@ -194,8 +203,6 @@ if [ "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ]; then
FWHACK=1
fi
- release_dhcp_lease
-
if [ -x /sbin/dhclient ] && /sbin/dhclient ${DHCLIENTARGS} ${DEVICE} ; then
echo $" done."
else
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index f59cf8d7..5bfb4724 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -393,29 +393,3 @@ change_resolv_conf ()
fi;
return $r;
}
-
-
-kill_dhcp_client ()
-{
- pid=`cat /var/run/dhclient-${DEVICE}.pid`
- kill $pid >/dev/null 2>&1
- rc=$?
- reason=STOP interface=${DEVICE} /sbin/dhclient-script
- if [ -f "/var/run/dhclient-${DEVICE}.pid" ]; then
- rm -f /var/run/dhclient-${DEVICE}.pid
- kill -9 $pid >/dev/null 2>&1
- fi
- return $rc
-}
-
-release_dhcp_lease ()
-{
- /sbin/dhclient -r -lf /var/lib/dhcp/dhclient-${DEVICE}.leases -pf /var/run/dhclient-${DEVICE}.pid ${DEVICE} >/dev/null 2>&1
- rc=$?
- if [ -f "/var/run/dhclient-${DEVICE}.pid" ]; then
- rm -f /var/run/dhclient-${DEVICE}.pid
- kill -9 $pid >/dev/null 2>&1
- fi
- return $rc
-}
-