Comment 11 for bug 1013843

Revision history for this message
Thomas Hood (jdthood) wrote :

> if [ ! -f /root/etc/resolv.conf ] || [ -z "$(cat /root/etc/resolv.conf)" ]; then
> if [ -n "${DEVICE}" ] && [ -e /tmp/net-"${DEVICE}".conf ]; then
> # create a resolv.conf if it is not present
> # Deal with resolvconf
> # Writing to /run instead or /root/run as /sbin/init will move /run
> # to /root/run a bit later on
> if [ -x /root/sbin/resolvconf ] && [ -L /root/etc/resolv.conf ]; then
> mkdir -p /run/resolvconf/interface/
> resolv=/run/resolvconf/interface/casper
> cat > $resolv <<EOF

I have just started learning about casper, ubiquity, and so on and am still highly clueless about them, but reading the code above makes me a bit suspicious.

Clearly casper will fail to cat to /run/resolvconf/interface/casper, the file that was present in Precise and has gone missing in Quantal, if any of the quoted "if" lines fails.

The first line looks like an attempt to test for /etc/resolv.conf being empty in the chroot. Now, when resolvconf is managing resolv.conf, the file always consists of at least two lines of comments. Hmm.