X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=etc%2Fgrml%2Fpump-scripts.d%2Fset-hostname;h=6682d3eb2750bb258c2480b77cbd1f105691c3e6;hp=0401075408496bf502146237d0a5ee2b65cc4a2d;hb=efc764b66b6954e7cb138414f4cc12bd9c7201f2;hpb=a4aa1ce734890455379b652117da324fb5cd586a diff --git a/etc/grml/pump-scripts.d/set-hostname b/etc/grml/pump-scripts.d/set-hostname index 0401075..6682d3e 100755 --- a/etc/grml/pump-scripts.d/set-hostname +++ b/etc/grml/pump-scripts.d/set-hostname @@ -13,9 +13,9 @@ # and if running in live mode if ! checkbootparam 'nodhcphostname' && [ -f /etc/grml_cd ] ; then - hostname=$(busybox nslookup $3 | awk '/Address 1: '$3'/ {print $4}') - [ -n $hostname ] || exit 1 + hostname=$(busybox nslookup "$3" | awk '/Address 1: '$3'/ {print $4}') + [ -n "$hostname" ] || exit 1 - grml-hostname $hostname + grml-hostname "$hostname" hostname -F /etc/hostname fi