1 # only run the comamnd if we bound to a new ip
2 case "$reason" in BOUND)
3 if ! grep -q 'nodhcphostname' /proc/cmdline && [ -f /etc/grml_cd ] ; then
5 hostname=$(busybox nslookup "$new_ip_address" | awk '/Address 1: '$new_ip_address'/ {print $4}')
6 if [ -n "$hostname" ] ; then
7 grml-hostname "$hostname"
8 hostname -F /etc/hostname