aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-eth
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifup-eth')
-rwxr-xr-xsysconfig/network-scripts/ifup-eth13
1 files changed, 10 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index ea9de5f6..d3adb143 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -176,7 +176,15 @@ if [ -n "${DYNCONFIG}" -a -x /sbin/dhclient ]; then
else
ONESHOT="-1";
fi;
- generate_config_file_name
+ # allow users to use generic '/etc/dhclient.conf' (as documented in manpage!)
+ # if per-device file doesn't exist or is empty
+ if [ -s /etc/dhcp/dhclient-${DEVICE}.conf ]; then
+ DHCLIENTCONF="-cf /etc/dhcp/dhclient-${DEVICE}.conf";
+ elif [ -s /etc/dhclient-${DEVICE}.conf ]; then
+ DHCLIENTCONF="-cf /etc/dhclient-${DEVICE}.conf";
+ else
+ DHCLIENTCONF='';
+ fi;
# copy any lease obtained by the initrd
for file in /dev/.dhclient-${DEVICE}.leases /dev/.initramfs/net.${DEVICE}.lease ; do
if [ -f "${file}" ]; then
@@ -291,8 +299,7 @@ fi
# IPv6 initialisation?
/etc/sysconfig/network-scripts/ifup-ipv6 ${CONFIG}
if [[ "${DHCPV6C}" = [Yy1]* ]] && [ -x /sbin/dhclient ]; then
- generate_config_file_name 6
- /sbin/dhclient -6 -1 ${DHCPV6C_OPTIONS} ${DHCLIENTCONF} -lf /var/lib/dhclient/dhclient6-${DEVICE}.leases -pf /var/run/dhclient6-${DEVICE}.pid ${DHCP_HOSTNAME:+-H $DHCP_HOSTNAME} ${DEVICE}
+ /sbin/dhclient -6 -1 ${DHCPV6C_OPTIONS} -lf /var/lib/dhclient/dhclient6-${DEVICE}.leases -pf /var/run/dhclient6-${DEVICE}.pid ${DHCP_HOSTNAME:+-H $DHCP_HOSTNAME} ${DEVICE}
fi
exec /etc/sysconfig/network-scripts/ifup-post ${CONFIG} ${2}