2 ########################################################################
5 # Description : DHCP Client Script (initrd version)
7 # Authors : Arne Fitzenreiter - arne_f@ipfire.org
13 ########################################################################
15 LEASE_FILE="/var/ipfire/dhcpc/dhcpcd-${interface}.info"
18 set | grep "^new_" | sed "s|^new_||g" | \
19 sed "s|'||g" | sort > ${LEASE_FILE}
23 local DNS="$(grep 'domain_name_servers' ${LEASE_FILE} | cut -d'=' -f2)"
24 local DNS1="$(echo ${DNS} | cut -d' ' -f1)"
25 local DNS2="$(echo ${DNS} | cut -d' ' -f2)"
28 echo "nameserver ${DNS1}"
29 echo "nameserver ${DNS2}"
36 if [ -n "${new_interface_mtu}" ] && [ ${new_interface_mtu} -gt 576 ]; then
37 echo "Setting MTU to ${new_interface_mtu}"
38 ip link set "${interface}" mtu "${new_interface_mtu}"
42 BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|STATIC)
43 # Export all information about the newly received lease
47 # Create system configuration files
51 ntpdate "time.ipfire.org"
54 EXPIRE|FAIL|IPV4LL|NAK|NOCARRIER|RELEASE|STOP)