aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdhcpc-done
blob: 239725de3216789b5afff3d2444e14ba9b7def67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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