[3506] in SIPB_Linux_Development

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

patch to deal with dhcp

daemon@ATHENA.MIT.EDU (Jeremy Daniel)
Thu Jun 14 01:15:05 2001

To: linux-dev@MIT.EDU
From: Jeremy Daniel <jdaniel@MIT.EDU>
Date: 14 Jun 2001 01:14:53 -0400
Message-ID: <ske1yon63si.fsf@hikari-no-ken.mit.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

This patch is so that an install done in dhcp mode will get come up as
a machine configured in dhcp mode instead of without address information.

*** /afs/sipb.mit.edu/system/rhlinux/redhat-6.2/RedHat/instimage/usr/lib/anaconda/installclass.py	Wed Apr 25 12:53:28 2001
--- /tmp/installclass.py	Thu Jun 14 01:08:03 2001
***************
*** 226,232 ****
  # Get network address:
  ADDR=`grep -i ipaddr /etc/sysconfig/network-scripts/ifcfg-eth0  \
  	|sed -e 's/^.*=//'`
! HOSTNAME=`chroot $ROOT host $ADDR | awk '{print $5}' | tr '[A-Z]' '[a-z]'`
  
  # Change default runlevel to 5 (X11) 
  $ROOT/bin/sed -e 's/id:3/id:5/' < $ROOT/etc/inittab > /tmp/inittab
--- 226,239 ----
  # Get network address:
  ADDR=`grep -i ipaddr /etc/sysconfig/network-scripts/ifcfg-eth0  \
  	|sed -e 's/^.*=//'`
! # if it was booted by DHCP then the ipaddr shouldn't be in ifcfg-eth0
! if [ "x$ADDR" = "x" ]; then
!   ADDR="dhcp"
!   # hostname left blank becuse it might not be 'real' hostname
!   HOSTNAME=""
! else
!   HOSTNAME=`chroot $ROOT host $ADDR | awk '{print $5}' | tr '[A-Z]' '[a-z]'`
! fi
  
  # Change default runlevel to 5 (X11) 
  $ROOT/bin/sed -e 's/id:3/id:5/' < $ROOT/etc/inittab > /tmp/inittab

-- 


				Jer


------------------------------------------------------------------
71 Porter St - Apt #2                  AIM: jdanielmit
Cambridge, MA 02142                    Phone: 617-349-3496
                                      
PGP key: http://web.mit.edu/jdaniel/Public/pgp
Zephyr athena users over the web:  http://webzephyr.mit.edu/

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