aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdhcpc-done
blob: 5444f105139a35851b397015494393d54bac8c8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

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