aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-08-10 17:17:32 -0400
committerBill Nottingham <notting@redhat.com>2009-08-10 17:17:32 -0400
commit15acacb90ebbbaa629a07cfb5ebd0513b35c3f5d (patch)
tree5f1f7ef54bd9fc2e13d09dc391f939ffcf053680
parent06cfcb7b84179ffe1ed1945ec74bd92294c7a915 (diff)
downloadinitscripts-15acacb90ebbbaa629a07cfb5ebd0513b35c3f5d.tar
initscripts-15acacb90ebbbaa629a07cfb5ebd0513b35c3f5d.tar.gz
initscripts-15acacb90ebbbaa629a07cfb5ebd0513b35c3f5d.tar.bz2
initscripts-15acacb90ebbbaa629a07cfb5ebd0513b35c3f5d.tar.xz
initscripts-15acacb90ebbbaa629a07cfb5ebd0513b35c3f5d.zip
Support dracut's location for dhclient leases as well. (#515771)
-rwxr-xr-xsysconfig/network-scripts/ifup-eth10
1 files changed, 6 insertions, 4 deletions
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index 7c9e33b6..80bc7388 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -196,10 +196,12 @@ if [ -n "${DYNCONFIG}" -a -x /sbin/dhclient ]; then
DHCLIENTCONF='';
fi;
# copy any lease obtained by the initrd
- if [ -f /dev/.dhclient-${DEVICE}.leases ] ; then
- mv -f /dev/.dhclient-${DEVICE}.leases /var/lib/dhclient/dhclient-${DEVICE}.leases
- [ -x /sbin/restorecon ] && restorecon /var/lib/dhclient/dhclient-${DEVICE}.leases > /dev/null 2>&1
- fi
+ for file in /dev/.dhclient-${DEVICE}.leases /dev/.initramfs/net.${DEVICE}.lease ; do
+ if [ -f "${file}" ]; then
+ mv -f $file /var/lib/dhclient/dhclient-${DEVICE}.leases
+ [ -x /sbin/restorecon ] && restorecon /var/lib/dhclient/dhclient-${DEVICE}.leases > /dev/null 2>&1
+ fi
+ done
DHCLIENTARGS="${DHCLIENTARGS} ${ONESHOT} -q ${DHCLIENTCONF} -lf /var/lib/dhclient/dhclient-${DEVICE}.leases -pf /var/run/dhclient-${DEVICE}.pid"
echo
echo -n $"Determining IP information for ${DEVICE}..."