aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdhcpc-done
blob: 8abc5cb1da2ea89b0057bfe364d65f1532f165d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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
	cp /etc/dhcpc/resolv.conf /etc
fi