3 # $1 Calling circumstance (up, renewal, down)
7 # Exit early, if we're not being called for the initial lease
8 [ "$1" != "up" ] && exit 0
10 . /etc/grml/autoconfig.functions
12 # only run if no nodhcphostname parameter is given
13 # and if running in live mode
14 if ! checkbootparam 'nodhcphostname' && [ -f /etc/grml_cd ] ; then
16 hostname=$(busybox nslookup "$3" | awk '/Address 1: '$3'/ {print $4}')
17 [ -n "$hostname" ] || exit 1
19 grml-hostname "$hostname"
20 hostname -F /etc/hostname