Public bug reported:

Binary package hint: ubuntu-vm-builder

I'm using 0.4-0ubuntu0.3 and running ubuntu-vm-builder with "--ip" to
set the IP address.

On the resulting VM, network fails to start at boot with the following error :
/etc/network/interfaces:18: option with empty value
ifup: couldn't read interfaces file "/etc/network/interfaces"

Analysis :
If you don't specify --domain, $DOMAIN is defaulted to `hostname -d`, which may 
return (on systems without a domain name set) an empty string.
$DOMAIN is then used on non-DHCP setup to fill a value in the interfaces files :

cat >> root/etc/network/interfaces <<EOF
iface eth0 inet static
        address $IP
        netmask $MASK 
        network $NET
        broadcast $BCAST
        gateway $GW
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers $DNS
        dns-search $DOMAIN
EOF

The resulting interfaces file has a "dns-search" option without a value,
that makes ifup reject the file.

Attached, a simple patch that just sets a default value ("localdomain") if 
$DOMAIN is still empty after $DOMAIN=`hostname -d`.
If you would prefer a proper debdiff just let me know.

** Affects: ubuntu-vm-builder (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Network fails to start in VM if domain not set on ubuntu-vm-builder host
https://bugs.launchpad.net/bugs/237580
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to