projects
/
grml-autoconfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
/etc/grml/pump-scripts.d/set-hostname: use busybox nslookup
[grml-autoconfig.git]
/
etc
/
grml
/
pump-scripts.d
/
set-hostname
diff --git
a/etc/grml/pump-scripts.d/set-hostname
b/etc/grml/pump-scripts.d/set-hostname
index
f4b46d1
..
9aec368
100755
(executable)
--- 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
# 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
if [ -n "$hostname" ] ; then
grml-hostname $hostname