hell script: (copy/paste from maas_enlist.sh)

##!/bin/sh -x

dig_output=""
ip=$(ifconfig wlan0 | awk '$1 == "inet" { sub("addr:","",$2); print $2; }') &&
     [ -n "${ip}" ] && dig_output=$(dig +short -x $ip) && host=${dig_output%.}
echo $host

-----------------------------

roaksoax@unleashed:~$ ./test.sh 
+ dig_output=
+ ifconfig wlan0+ 
awk $1 == "inet" { sub("addr:","",$2); print $2; }
+ ip=10.0.0.175
+ [ -n 10.0.0.175 ]
+ dig +short -x 10.0.0.175
+ dig_output=;; connection timed out; no servers could be reached
+ echo

$host variable results in an empty string even if dig_output=;;
connection timed out; no servers could be reached. I think this is
fixed?

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to maas-enlist in Ubuntu.
https://bugs.launchpad.net/bugs/1081660

Title:
  If maas-enlist fails to reach a DNS server, the node will be named ";;
  connection timed out; no servers could be reached"

To manage notifications about this bug go to:
https://bugs.launchpad.net/maas/+bug/1081660/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to