X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=debian%2Fpatches%2F11_dhcphostname.dpatch;h=162aa56db2de3fb7ad5f03400b76146ba7f817b1;hb=ac134a9f5c0342bc0eb332b6e06494d348fb5ef1;hp=69b9d691161ce6e5c1082d011bb7111fc6e2404a;hpb=21e0bfa7c7394a1a2a2a5309e4f38662df5cfdc9;p=live-boot-grml.git diff --git a/debian/patches/11_dhcphostname.dpatch b/debian/patches/11_dhcphostname.dpatch index 69b9d69..162aa56 100755 --- a/debian/patches/11_dhcphostname.dpatch +++ b/debian/patches/11_dhcphostname.dpatch @@ -13,28 +13,6 @@ This patch takes care of the netboot case. diff --git a/scripts/live-bottom/23networking b/scripts/live-bottom/23networking index 9554b77..9270e9c 100755 ---- a/scripts/live-bottom/23networking -+++ b/scripts/live-bottom/23networking -@@ -135,6 +135,19 @@ ${rc_server1} - EOF - - cat /root/etc/resolv.conf >> /root/var/log/netboot.config -+ -+ if [ -z "$NODHCPHOSTNAME" ] -+ then -+ dhcp_address=$(cat netboot.config | awk '/address:/{print $2}') -+ dhcp_hostname=$(busybox nslookup ${dhcp_address} ${rc_server0#nameserver }| awk \ -+ '/Address 1: '${dhcp_address}'/{ print $4 }') -+ -+ if [ -n "$dhcp_hostname" ] -+ then -+ echo $dhcp_hostname > /root/etc/hostname -+ fi -+ unset dhcp_address dhcp_hostname dhcp_hostname -+ fi - fi - fi - fi --- a/scripts/live +++ b/scripts/live @@ -216,6 +216,11 @@ Arguments ()