]>
Commit | Line | Data |
---|---|---|
1393a0c8 MT |
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 | ||
0e42072a MT |
15 | . /etc/sysconfig/rc |
16 | . ${rc_functions} | |
17 | ||
1393a0c8 MT |
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 | |
0e42072a | 23 | run_subdir ${rc_base}/init.d/networking/red.up/ |
1393a0c8 MT |
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 | |
0e42072a MT |
28 | run_subdir ${rc_base}/init.d/networking/red.down/ |
29 | run_subdir ${rc_base}/init.d/networking/red.up/ | |
1393a0c8 MT |
30 | ;; |
31 | down) | |
32 | logger -p local0.info -t dhcpcd.exe[$$] "${INTERFACE} has been brought down" | |
33 | rm -f /var/ipfire/red/active | |
0e42072a | 34 | run_subdir ${rc_base}/init.d/networking/red.down/ |
1393a0c8 MT |
35 | ;; |
36 | esac | |
37 | ||
38 | # End |