diff --git a/appliance/init b/appliance/init index b474f313e..be547e3b6 100755 --- a/appliance/init +++ b/appliance/init @@ -80,6 +80,8 @@ ip link set dev eth0 up ip route add default via 169.254.2.2 +echo nameserver 169.254.2.3 > /etc/resolv.conf + # Scan for MDs. mdadm -As --auto=yes --run diff --git a/appliance/make.sh.in b/appliance/make.sh.in index 8ba1fa481..c4b1c64d7 100755 --- a/appliance/make.sh.in +++ b/appliance/make.sh.in @@ -53,12 +53,6 @@ grep -v '^/usr/share/gnome/help/' | grep -v '^/usr/share/cracklib/' | grep -v '^/usr/share/i18n/' > supermin.d/hostfiles-t -# XXX resolv.conf? The old script had: -# echo nameserver 169.254.2.3 > resolv.conf -if ! grep -q /etc/resolv.conf supermin.d/hostfiles-t; then - echo /etc/resolv.conf >> supermin.d/hostfiles-t -fi - # Include any Augeas lenses from the host. if grep -q /usr/share/augeas/lenses supermin.d/hostfiles-t; then echo "/usr/share/augeas/lenses/*.aug" >> supermin.d/hostfiles-t diff --git a/src/launch.c b/src/launch.c index 9c1c33a31..b7b5b809b 100644 --- a/src/launch.c +++ b/src/launch.c @@ -93,13 +93,6 @@ guestfs__launch (guestfs_h *g) if (g->backend_ops->launch (g, g->backend_data, g->backend_arg) == -1) return -1; - /* If network is enabled, upload /etc/resolv.conf from the host so - * the guest will know how to reach the nameservers. - */ - if (g->enable_network && access ("/etc/resolv.conf", F_OK) == 0) { - guestfs_internal_upload (g, "/etc/resolv.conf", "/etc/resolv.conf", 0644); - } - return 0; }