[25822] in Source-Commits
/svn/athena r25248 - trunk/debathena/scripts/installer/pxe/natty/debathena
daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Sat Jul 16 20:34:51 2011
Date: Sat, 16 Jul 2011 20:34:34 -0400
From: Geoffrey Thomas <geofft@MIT.EDU>
Message-Id: <201107170034.p6H0YY3Q031921@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: geofft
Date: 2011-07-16 20:34:33 -0400 (Sat, 16 Jul 2011)
New Revision: 25248
Modified:
trunk/debathena/scripts/installer/pxe/natty/debathena/installer.sh
Log:
installer: Write IP info to preseed file differently
The logic from r25246 would never work. We actually just want to grab
the info preseeded on the kernel command line.
Modified: trunk/debathena/scripts/installer/pxe/natty/debathena/installer.sh
===================================================================
--- trunk/debathena/scripts/installer/pxe/natty/debathena/installer.sh 2011-07-16 22:25:03 UTC (rev 25247)
+++ trunk/debathena/scripts/installer/pxe/natty/debathena/installer.sh 2011-07-17 00:34:33 UTC (rev 25248)
@@ -82,6 +82,14 @@
echo "nameserver 18.70.0.160" >> /etc/resolv.conf.new
echo "nameserver 18.71.0.151" >> /etc/resolv.conf.new
mv -f /etc/resolv.conf.new /etc/resolv.conf
+ echo "Saving preseed netcfg values"
+ cat >> preseed <<EOF
+d-i netcfg/get_nameservers string 18.72.0.3
+d-i netcfg/get_ipaddress string $IPADDR
+d-i netcfg/get_netmask string $NETMASK
+d-i netcfg/get_gateway string $GATEWAY
+d-i netcfg/confirm_static boolean true
+EOF
}
# Color strings. I'd like to use tput, but the installer doesn't have it.
@@ -102,15 +110,12 @@
if [ -n "$clusteraddr" ] && [ "$nodhcp" != "true" ]; then
IPADDR=$clusteraddr
netconfig
+else
+ # We're not running netconfig here, but install-debathena.sh still
+ # uses the information from the preseed. So convert information from
+ # the kernel command line to the preseed file format.
+ sed "s/ /\n/g" < /proc/cmdline | grep "^netcfg" | sed -e "s/^/d-i /" -e "s/=/ string /" >> preseed
fi
-echo "Saving preseed netcfg values"
-cat >> preseed <<EOF
-d-i netcfg/get_nameservers string 18.72.0.3
-d-i netcfg/get_ipaddress string $IPADDR
-d-i netcfg/get_netmask string $NETMASK
-d-i netcfg/get_gateway string $GATEWAY
-d-i netcfg/confirm_static boolean true
-EOF
# We're at a point in the install process where we can be fairly sure
# that nothing else is happening, so "killall wget" should be safe.