aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdhcpc-done
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifdhcpc-done')
-rw-r--r--sysconfig/network-scripts/ifdhcpc-done20
1 files changed, 20 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifdhcpc-done b/sysconfig/network-scripts/ifdhcpc-done
new file mode 100644
index 00000000..239725de
--- /dev/null
+++ b/sysconfig/network-scripts/ifdhcpc-done
@@ -0,0 +1,20 @@
+#!/bin/sh -x
+
+SLEEPPIDFILE=/var/run/dhcp-wait-${IFNAME}.pid
+
+if [ ! -f $SLEEPPIDFILE ]; then
+ # the parent must have timed out already -- we can't do much about
+ # it now
+ echo "DHCP configured but ifup timed out"
+ #exit 0
+fi
+
+# get the pid of the process which is waiting for this to complete
+SLEEPPID=`cat $SLEEPPIDFILE`
+rm -f $SLEEPPIDFILE
+kill $SLEEPPID
+
+if [ -f /etc/dhcpc/resolv.conf ]; then
+ echo "setting up resolv.conf" >> /tmp/dhcplog
+ cp /etc/dhcpc/resolv.conf /etc
+fi