[SCM] debian-live/live-initramfs branch, master, updated. 1.118.2-1-1-g799587c
Daniel Baumann
daniel at debian.org
Tue Mar 4 10:26:45 UTC 2008
The following commit has been merged in the master branch:
commit 799587cea16b8aa244961596abaad44ba51fab10
Author: Daniel Baumann <daniel at debian.org>
Date: Tue Mar 4 11:26:41 2008 +0100
Creating resolv.conf when netbooting not just when there's no resolv.conf, but also when it is empty.
diff --git a/scripts/live-bottom/23networking b/scripts/live-bottom/23networking
index 603116f..6c726c6 100755
--- a/scripts/live-bottom/23networking
+++ b/scripts/live-bottom/23networking
@@ -98,22 +98,24 @@ EOF
done
fi
- if [ ! -f /root/etc/resolv.conf -a -f /netboot.config ]
+ if [ ! -f /root/etc/resolv.conf ] || [ -z "$(cat /root/etc/resolv.conf)" ]
then
- # create a resolv.conf if it is not present
- cp /netboot.config /root/var/log/netboot.config
+ if [ -f /netboot.config ]
+ then
+ # create a resolv.conf if it is not present or empty
+ cp /netboot.config /root/var/log/netboot.config
- rc_search=$(cat netboot.config | awk '/domain/{print $3}')
- rc_server0=$(cat netboot.config | awk '/dns0/{print $5}')
- rc_server1=$(cat netboot.config | awk '/dns0/{print $8}')
- rc_server0="nameserver ${rc_server0}"
+ rc_search=$(cat netboot.config | awk '/domain/{print $3}')
+ rc_server0=$(cat netboot.config | awk '/dns0/{print $5}')
+ rc_server1=$(cat netboot.config | awk '/dns0/{print $8}')
+ rc_server0="nameserver ${rc_server0}"
- if [ "${rc_server1}" = "0.0.0.0" ]
- then
- rc_server1=""
- else
- rc_server1="nameserver ${rc_server1}"
- fi
+ if [ "${rc_server1}" = "0.0.0.0" ]
+ then
+ rc_server1=""
+ else
+ rc_server1="nameserver ${rc_server1}"
+ fi
cat > /root/etc/resolv.conf << EOF
# /etc/resolv.conf
@@ -124,7 +126,8 @@ ${rc_server0}
${rc_server1}
EOF
- cat /root/etc/resolv.conf >> /root/var/log/netboot.config
+ cat /root/etc/resolv.conf >> /root/var/log/netboot.config
+ fi
fi
fi
--
debian-live/live-initramfs
More information about the debian-live-changes
mailing list