From b86da8b34ae43f5a48a35fca899f9701051032bf Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 18 Oct 2009 16:44:38 +0200 Subject: [PATCH 1/1] /etc/grml/pump-scripts.d/set-hostname: use busybox nslookup --- debian/changelog | 7 +++++++ etc/grml/pump-scripts.d/set-hostname | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7b057ed..14e44c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +grml-autoconfig (0.8.36) unstable; urgency=low + + * /etc/grml/pump-scripts.d/set-hostname: use busybox nslookup instead of + host(1) so the script works on grml-medium and grml-small as well. + + -- Michael Prokop Sun, 18 Oct 2009 16:43:25 +0200 + grml-autoconfig (0.8.35) unstable; urgency=low * Revert "unicode_start command: do not redirect stderr to debug file" diff --git a/etc/grml/pump-scripts.d/set-hostname b/etc/grml/pump-scripts.d/set-hostname index f4b46d1..9aec368 100755 --- a/etc/grml/pump-scripts.d/set-hostname +++ b/etc/grml/pump-scripts.d/set-hostname @@ -13,9 +13,8 @@ # and if running in live mode if ! checkbootparam 'nodhcphostname' && [ -f /etc/grml_cd ] ; then - hostname=$(host $3) || exit 1 - # dhcphostname is set, get the PTR for the ip - hostname=$(echo ${hostname} | awk '{ print substr($5, 0, length($5)-1) }') + hostname=$(busybox nslookup $3 | awk '/Address 1: '$3'/ {print $4}') + [ -n $hostname ] || exit 1 if [ -n "$hostname" ] ; then grml-hostname $hostname -- 2.1.4