From: Mark W. <ri...@us...> - 2005-01-27 19:41:58
|
Update of /cvsroot/ipcop/ipcop/updates/1.4.3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2483 Modified Files: Tag: IPCOP_v1_4_0 setup Log Message: Fix initrd as well Index: setup =================================================================== RCS file: /cvsroot/ipcop/ipcop/updates/1.4.3/Attic/setup,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -C2 -d -r1.1.2.11 -r1.1.2.12 *** setup 27 Jan 2005 19:05:14 -0000 1.1.2.11 --- setup 27 Jan 2005 19:41:37 -0000 1.1.2.12 *************** *** 17,23 **** /sbin/tune2fs -m 1 /dev/harddisk4 - # /bin/sed -i -e "s+= '1.4.*$+= '$UPGRADEVERSION';+" /var/ipcop/header.pl - /bin/tar -zxpf patch.tar.gz -C / - # Fix grub ROOTDEV=`/bin/ls -l /dev/harddisk4 | /usr/bin/awk '{ print $NF }'` --- 17,20 ---- *************** *** 25,33 **** echo " root (hd0,0)" >> /boot/grub/grub.conf echo " kernel /vmlinuz-2.4.27 root=${ROOTDEV} panic=10 acpi=off ro" >> /boot/grub/grub.conf ! if ( grep -q ipcoprd.img /boot/grub/grub.conf ); then ! echo " initrd /ipcoprd.img" >> /boot/grub/grub.conf fi echo " savedefault" >> /boot/grub/grub.conf # Change tar.gz to tgz.gpg in language files. # Completes fix for SF Bug 1077494 --- 22,64 ---- echo " root (hd0,0)" >> /boot/grub/grub.conf echo " kernel /vmlinuz-2.4.27 root=${ROOTDEV} panic=10 acpi=off ro" >> /boot/grub/grub.conf ! if [ -f /boot/ipcoprd.img ]; then ! echo " initrd /ipcoprd-2.4.27.img" >> /boot/grub/grub.conf fi echo " savedefault" >> /boot/grub/grub.conf + # Fix initrd + if [ -f /boot/ipcoprd.img ]; then + # Find out scsi module + IMAGE=`/usr/bin/mktemp /tmp/ipcoprd.img.XXXXXX` + MNTPOINT=`/usr/bin/mktemp -d /tmp/ipcoprd.mnt.XXXXXX` + /bin/gzip -d -c /boot/ipcoprd.img > $IMAGE + /bin/mount -o loop $IMAGE $MNTPOINT + SCSIDRIVER=`/bin/ls -1 $MNTPOINT/lib | \ + /bin/grep -v sd_mod.o.gz |\ + /bin/grep -v sg.o.gz |\ + /bin/grep -v sr_mod.o.gz |\ + /bin/grep -v 53c700.o.gz |\ + /bin/grep -v NCR53C9x.o.gz |\ + /bin/grep -v libata.o.gz |\ + /bin/grep -v scsi_mod.o.gz |\ + /bin/grep -v ataraid.o.gz |\ + /bin/grep -v mptbase.o.gz |\ + /bin/grep -v isa-pnp.o |\ + /bin/grep -v ds.o.gz |\ + /bin/grep -v pcmcia_core.o.gz |\ + /bin/sed 's/.o.gz//'` + /bin/umount $MNTPOINT + /bin/rm -rf $MNTPOINT $IMAGE + /bin/mv -f /boot/ipcoprd.img /boot/ipcoprd-2.4.27.img + /bin/mv -f /boot/ipcoprd-smp.img /boot/ipcoprd-smp-2.4.27.img + if [ "$SCSIDRIVER" ]; then + /sbin/mkinitrd --with=scsi_mod --with=${SCSIDRIVER} --with=sd_mod --with=sr_mod --with=libata --with=ataraid /boot/ipcoprd.img 2.4.29 + /sbin/mkinitrd --with=scsi_mod --with=${SCSIDRIVER} --with=sd_mod --with=sr_mod --with=libata --with=ataraid /boot/ipcoprd-smp.img 2.4.29-smp + fi + fi + + # /bin/sed -i -e "s+= '1.4.*$+= '$UPGRADEVERSION';+" /var/ipcop/header.pl + /bin/tar -zxpf patch.tar.gz -C / + # Change tar.gz to tgz.gpg in language files. # Completes fix for SF Bug 1077494 |