Ticket #333: debathena-jaunty-installer-sh.patch

File debathena-jaunty-installer-sh.patch, 1.9 KB (added by broder, 14 years ago)
  • debathena-jaunty/installer.sh

    ../  
    160160  egrep -v '(^$|^#)' < preseed.autoinstall >> preseed 
    161161fi 
    162162 
     163if [ -z "$mirrorsite" ] ; then mirrorsite=ubuntu.media.mit.edu ; fi 
     164 
    163165# Set up a usable static network config, since the DHCP address is not very useful. 
    164 netconfig 
     166if [ choose = $pxetype ]; then 
     167  if ping $mirrorsite ; then 
     168    if ip address | grep '    inet 18\.' >/dev/null ; then 
     169      echo "Your computer seems to be registered on MITnet." 
     170    else 
     171      echo "Your computer seems not to be registered on MITnet, but the mirror" 
     172      echo "site $mirrorsite is accessible." 
     173    fi 
     174    echo 
     175    echo "${ccc}You can continue the install using your existing dynamic address.${nnn}" 
     176    echo -n "Configure a static address anyway?  [y/N]: " 
     177    while : ; do 
     178      read r 
     179      case "$r" in 
     180        N*|n*|"") break;; 
     181        y*|Y*) netconfig; break;; 
     182      esac 
     183      echo -n "Choose: [y/N]: " 
     184    done 
     185  else 
     186    echo "The mirror site $mirrorsite is NOT accessible in your current" 
     187    echo "dynamic configuration." 
     188    echo 
     189    echo "${rrr}You must specify a static address for the installation.${nnn}" 
     190    netconfig 
     191  fi 
     192else 
     193  netconfig 
     194fi 
    165195 
    166196# Shovel in the generically useful preseed stuff regardless. 
    167197egrep -v '(^$|^#)' < preseed.common >> preseed 
    168 # ...and the specified network config. 
    169 cat >> preseed <<EOF 
     198 
     199if [ "$IPADDR" ] ; then 
     200  # ...and the specified network config. 
     201  cat >> preseed <<EOF 
    170202d-i netcfg/get_nameservers string 18.72.0.3 
    171203d-i netcfg/get_ipaddress string $IPADDR 
    172204d-i netcfg/get_netmask string $NETMASK 
    173205d-i netcfg/get_gateway string $GATEWAY 
    174206d-i netcfg/confirm_static boolean true 
    175207EOF 
    176  
    177 if [ -z "$mirrorsite" ] ; then mirrorsite=ubuntu.media.mit.edu ; fi 
     208fi 
    178209 
    179210# Perferred hostname of mirror site 
    180211cat >> preseed <<EOF