[28429] in Source-Commits

home help back first fref pref prev next nref lref last post

scripts commit: Remove legacy cluster network-fixup code

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Tue Sep 16 10:59:34 2014

Date: Tue, 16 Sep 2014 10:59:27 -0400
From: Jonathan D Reed <jdreed@mit.edu>
Message-Id: <201409161459.s8GExRU3020009@drugstore.mit.edu>
To: source-commits@mit.edu

https://github.com/mit-athena/scripts/commit/714eda06939b916bbfd5be72ff095c1020187382
commit 714eda06939b916bbfd5be72ff095c1020187382
Author: Jonathan Reed <jdreed@mit.edu>
Date:   Tue Sep 16 10:59:07 2014 -0400

    Remove legacy cluster network-fixup code
    
    Now that all stage2 installs require a working network at boot, there
    is no need to "fixup" the ifupdown config that netcfg generates.
    
    The installer really shouldn't muck with anything on disk.  Networking
    stuff specific to PXE installs should be handled in the postinstall
    script, if we ever need to do this in the future.

 installer/install-debathena.beta.sh |   43 +----------------------------------
 1 files changed, 1 insertions(+), 42 deletions(-)

diff --git a/installer/install-debathena.beta.sh b/installer/install-debathena.beta.sh
index 7831062..440c770 100644
--- a/installer/install-debathena.beta.sh
+++ b/installer/install-debathena.beta.sh
@@ -294,50 +294,9 @@ if [ "$unattended" = "yes" ]; then
   echo "Mounting /proc."
   mount /proc 2> /dev/null || :
   # Clear toxic environment settings inherited from the installer.
+  # TODO: verify this is still needed in modern installers
   unset DEBCONF_REDIR
   unset DEBIAN_HAS_FRONTEND
-  if [ cluster = "$category" ] && [ "$unattended" = "yes" ]; then
-    # Network, LVM, and display config that's specific to PXE cluster installs.
-    # If someone is installing -cluster on an already-installed machine, it's
-    # assumed that this config has already happened and shouldn't be stomped on.
-
-    # Configure network based on the preseed file settings, if present.
-    if test -f /root/debathena.preseed && ! grep -q netcfg/get_ipaddress /proc/cmdline; then
-      # Switch to canonical hostname.
-      ohostname=`cat /etc/hostname`
-      # Hack to avoid installing debconf-get for just this.
-      ipaddr=`grep netcfg/get_ipaddress /root/debathena.preseed|sed -e 's/.* //'`
-      netmask=`grep netcfg/get_netmask /root/debathena.preseed|sed -e 's/.* //'`
-      gateway=`grep netcfg/get_gateway /root/debathena.preseed|sed -e 's/.* //'`
-
-      hostname=`host $ipaddr | \
-          sed 's#^.*domain name pointer \(.*\)$#\1#' | sed 's;\.*$;;' | \
-          tr '[A-Z]' '[a-z]'`
-      if echo $hostname|grep -q "not found" ; then
-	hostname=""
-	printf "\a"; sleep 1 ; printf "\a"; sleep 1 ;printf "\a"
-	echo "The IP address you selected, $ipaddr, does not have an associated"
-	echo "hostname.  Please confirm that you're using the correct address."
-	while [ -z "$hostname" ] ; do
-	  echo -n "Enter fully qualified hostname [no default]: "
-	  read hostname
-	done
-      fi
-      echo ${hostname%%.*} > /etc/hostname
-      sed -e 's/\(127\.0\.1\.1[ 	]*\).*/\1'"$hostname ${hostname%%.*}/" < /etc/hosts > /etc/hosts.new
-      mv -f /etc/hosts.new /etc/hosts
-      if grep -q dhcp /etc/network/interfaces ; then
-	sed -e s/dhcp/static/ < /etc/network/interfaces > /etc/network/interfaces.new
-	echo "	address $ipaddr" >> /etc/network/interfaces.new
-	echo "	netmask $netmask" >> /etc/network/interfaces.new
-	echo "	gateway $gateway" >> /etc/network/interfaces.new
-	echo "	dns-nameservers 18.72.0.3 18.70.0.160 18.71.0.151" >> /etc/network/interfaces.new
-	mv -f /etc/network/interfaces.new /etc/network/interfaces
-      fi
-      hostname ${hostname%%.*}
-    fi
-
-  fi
 else
   output "Press return to begin or control-C to abort"
   read dummy

home help back first fref pref prev next nref lref last post