[patch] if DHCP is used, also write a new /etc/resolv.conf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ltsp (Ubuntu) |
Fix Released
|
Wishlist
|
Alkis Georgopoulos |
Bug Description
In certain cases, dhcp is used to configure the network interfaces in initramfs/
This might break $stuff for people who've already hardcoded name servers in /opt/ltsp/$arch which are different from those given out by the dhcpd. But maybe those people might want to configure their dhcpd correctly instead.
=== modified file 'scripts/ltsp_nbd'
--- scripts/ltsp_nbd 2008-03-04 12:54:54 +0000
+++ scripts/ltsp_nbd 2008-03-04 14:20:13 +0000
@@ -109,6 +108,17 @@
cp ./lts.conf ${rootmnt}/etc/
fi
+
+ if [ -n "$IPV4DNS0" ]; then
+ echo "# created by the LTSP initramfs" > ${rootmnt}
+ echo "nameserver $IPV4DNS0" >> ${rootmnt}
+ fi
+
+ if [ -n "$IPV4DNS1" ]; then
+ echo "nameserver $IPV4DNS1" >> ${rootmnt}
+ fi
+
+
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/
run_scripts /scripts/nfs-bottom
[ "$quiet" != "y" ] && log_end_msg
Changed in ltsp: | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
It looks like ipconfig tells us that the secondary name server is 0.0.0.0 if it's not set. Or my dnsmasq is probably misconfigured. Anyways, there's the updated patch:
=== modified file 'scripts/ltsp_nbd'
--- scripts/ltsp_nbd 2008-03-04 12:35:43 +0000
+++ scripts/ltsp_nbd 2008-03-05 00:32:29 +0000
@@ -101,6 +109,17 @@
cp ./lts.conf ${rootmnt}/etc/
fi
+ /etc/resolv. conf /etc/resolv. conf /etc/resolv. conf nfs-bottom"
+ if [ -n "$IPV4DNS0" ] && [ ! "$IPV4DNS0" = "0.0.0.0" ] ; then
+ echo "# created by the LTSP initramfs" > ${rootmnt}
+ echo "nameserver $IPV4DNS0" >> ${rootmnt}
+ fi
+
+ if [ -n "$IPV4DNS1" ] && [ ! "$IPV4DNS1" = "0.0.0.0" ]; then
+ echo "nameserver $IPV4DNS1" >> ${rootmnt}
+ fi
+
+
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/
run_scripts /scripts/nfs-bottom
[ "$quiet" != "y" ] && log_end_msg