]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/init.d/networking/dhcpcd.exe
f8331308c76b3f7cd0f086508df2af532e1659e4
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / networking / dhcpcd.exe
1 #!/bin/sh
2 ########################################################################
3 # Begin
4 #
5 # Description : DHCP Client Script
6 #
7 # Authors : Michael Tremer - mitch@ipfire.org
8 #
9 # Version : 01.00
10 #
11 # Notes :
12 #
13 ########################################################################
14
15 . /etc/sysconfig/rc
16 . ${rc_functions}
17
18 eval $(/usr/local/bin/readhash "$1")
19 case "$2" in
20 up)
21 logger -p local0.info -t dhcpcd.exe[$$] "${INTERFACE} has been configured with old IP=${IPADDR}"
22 touch /var/ipfire/red/active
23 run_subdir ${rc_base}/init.d/networking/red.up/
24 ;;
25 new)
26 logger -p local0.info -t dhcpcd.exe[$$] "${INTERFACE} has been configured with new IP=${IPADDR}"
27 [ -e "/var/ipfire/red/active" ] || touch /var/ipfire/red/active
28 run_subdir ${rc_base}/init.d/networking/red.down/
29 run_subdir ${rc_base}/init.d/networking/red.up/
30 ;;
31 down)
32 logger -p local0.info -t dhcpcd.exe[$$] "${INTERFACE} has been brought down"
33 rm -f /var/ipfire/red/active
34 run_subdir ${rc_base}/init.d/networking/red.down/
35 ;;
36 esac
37
38 # End