Changeset 543 in MondoRescue for branches/stable/mindi
- Timestamp:
- May 13, 2006, 8:52:38 PM (19 years ago)
- Location:
- branches/stable/mindi
- Files:
-
- 4 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi/VERSION
r542 r543 1 1.0. 71 1.0.8 -
branches/stable/mindi/distributions/gentoo/mindi.ebuild
r541 r543 1 1 # Copyright 1999-2005 Gentoo Foundation 2 2 # Distributed under the terms of the GNU General Public License v2 3 # $ Header: /var/cvsroot/gentoo-x86/sys-apps/mindi/mindi-1.04.ebuild,v 1.1 2005/01/22 10:29:25 wschlich Exp$3 # $Id$ 4 4 5 5 DESCRIPTION="A program that creates emergency boot disks/CDs using your kernel, tools and modules." 6 6 HOMEPAGE="http://www.mondorescue.org" 7 SRC_URI="ftp://ftp. berlios.de/pub/mondorescue/src/${P}.tgz"7 SRC_URI="ftp://ftp.mondorescue.org/src/${P}.tgz" 8 8 9 9 LICENSE="GPL-2" … … 15 15 RDEPEND=">=app-arch/bzip2-0.9 16 16 >=sys-apps/mindi-kernel-1.0-r1 17 app-cdr/cdrtools18 17 sys-libs/ncurses 19 18 sys-devel/binutils … … 23 22 src_unpack() { 24 23 unpack ${A} || die "Failed to unpack ${A}" 25 cd ${S}/rootfs || die26 tar xzf symlinks.tgz || die "Failed to unpack symlinks.tgz"27 28 # This will need to change when IA64 is tested. Obviously.29 rm -f bin/busybox-ia64 sbin/parted2fdisk-ia6430 mv bin/busybox-i386 bin/busybox31 24 } 32 25 33 26 src_install() { 27 export PREFIX="/usr" 28 export CONFDIR="/etc" 29 export RPMBUILDMINDI="true" 34 30 ./install.sh 35 31 } -
branches/stable/mindi/install.sh
r542 r543 58 58 fi 59 59 chmod 755 $local/sbin/mindi 60 install -m 755 analyze-my-lvm parted2fdisk.pl $local/sbin 60 install -m 755 parted2fdisk.pl $local/sbin 61 install -m 755 analyze-my-lvm $locallib/mindi 61 62 62 63 install -m 644 mindi.8 $MANDIR … … 103 104 if [ "$RPMBUILDMINDI" != "true" ]; then 104 105 chown -R root:root $locallib/mindi $conf $DOCDIR 105 chown root:root $local/sbin/mindi $MANDIR/mindi.8 $local /sbin/analyze-my-lvm $local/sbin/parted2fdisk.pl106 chown root:root $local/sbin/mindi $MANDIR/mindi.8 $locallib/mindi/analyze-my-lvm $local/sbin/parted2fdisk.pl 106 107 if [ "$ARCH" = "ia64" ] ; then 107 108 chown root:root $local/sbin/parted2fdisk -
branches/stable/mindi/mindi
r542 r543 67 67 FLOPPY_MODS="ide-floppy floppy" 68 68 TAPE_MODS="ht st osst ide-tape ide_tape" 69 SCSI_MODS="3 c59x 3w-xxxx 53c7,8xx a100u2w a320raid aacraid advansys aha152x aha1542 aha1740 aic79xx aic79xx_mod aic7xxx aic7xxx_mod aic7xxx_old AM53C974 atp870u BusLogic cciss cpqfc dmx3191d dpt_i2o dtc eata eata_dma eata_pio fdomain gdth g_NCR5380 ide-scsi ieee1394 imm in2000 initio ips iscsi isp megaraid mptbase mptscsih NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qlogicfas qlogicfc qlogicisp raw1394 scsi_debug scsi_mod sd_mod seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs"69 SCSI_MODS="3w-xxxx 53c7,8xx a100u2w a320raid aacraid advansys aha152x aha1542 aha1740 aic79xx aic79xx_mod aic7xxx aic7xxx_mod aic7xxx_old AM53C974 atp870u BusLogic cciss cpqfc dmx3191d dpt_i2o dtc eata eata_dma eata_pio fdomain gdth g_NCR5380 ide-scsi ieee1394 imm in2000 initio ips iscsi isp megaraid mptbase mptscsih NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qlogicfas qlogicfc qlogicisp raw1394 scsi_debug scsi_mod sd_mod seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs" 70 70 71 71 # ide-probe-mod … … 74 74 USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd usbkbd" 75 75 CDROM_MODS="$TAPE_MODS $FLOPPY_MODS $IDE_MODS af_packet cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 sg sr_mod zlib_inflate $USB_MODS $PCMCIA_MODS" 76 NET_MODS="sunrpc nfs nfs_acl lockd loop mii e100 bcm5700 e1000 eepro100 tg3 pcnet32vmxnet"77 EXTRA_MODS="$CDROM_MODS vfat fat loop linear raid0 raid1raid5 lvm-mod dm-mod jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd"76 NET_MODS="sunrpc nfs nfs_acl lockd loop mii 3c59x e100 bcm5700 e1000 eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 vmxnet" 77 EXTRA_MODS="$CDROM_MODS vfat fat loop md-mod linear raid0 raid1 xor raid5 lvm-mod dm-mod jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd" 78 78 LOGFILE=/var/log/mindi.log 79 79 FDDEVICE=/dev/fd0 ; # 1.44MB floppy #0 … … 452 452 [ "$?" -ne "0" ] && cat /tmp/mke2fs.$$ 453 453 rm -f /tmp/mke2fs.$$ 454 mount -t ext2 -o loop $imagefile $mountpoint || Die "Can't loopmount $ mountpoint; does your kernel support loopfs? If not, please recompile your kernel. Your Linux distro is broken."454 mount -t ext2 -o loop $imagefile $mountpoint || Die "Can't loopmount $imagefile to $mountpoint! The reason may be missing support for loopfs or ext2 (or both) in the running kernel." 455 455 mv $tarball $mountpoint/ 456 456 if [ "$?" -ne "0" ] ; then … … 1315 1315 if [ -d "/proc/lvm" ] || [ -d "/dev/mapper" ]; then 1316 1316 echo -en "\rAnalyzing LVM...\r" 1317 all_partitions=`$MINDI_ SBIN/analyze-my-lvm | fgrep ">>>" | cut -d' ' -f2-32`1317 all_partitions=`$MINDI_LIB/analyze-my-lvm | fgrep ">>>" | cut -d' ' -f2-32` 1318 1318 fi 1319 1319 all_partitions="$all_partitions `ListAllPartitions 2> /dev/null`" … … 1330 1330 [ "`echo "$c_p" | grep -x "/dev/cdroms.*"`" ] && continue 1331 1331 if [ -h "$c_p" ] && [ "`echo "$c_p" | fgrep "/dev/hd"`" = "" ] && [ "`echo "$c_p" | fgrep "/dev/sd"`" = "" ] && [ "`echo "$c_p" | fgrep "/dev/md"`" = "" ] ; then 1332 1332 current_partition=`ResolveSoftlink $c_p` 1333 1333 [ "`echo "$current_partition" | fgrep "/dev/mapper"`" != "" ] && current_partition="$c_p" 1334 1334 [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | fgrep "$current_partition"`" ] && continue 1335 1335 else 1336 1336 current_partition="$c_p" 1337 1337 fi 1338 1338 [ "$c_p" = "none" ] && continue 1339 absolute_partition=`ResolveSoftlink $c_p` 1340 partition_mountpt=`tr -s '\t' ' ' < $MY_FSTAB | grep -w "$current_partition" | grep -vx " *#.*" | $AWK '{print $2}' | head -n1` 1341 redhat_label="" 1342 if [ "`echo "$current_partition" | fgrep -i "LABEL="`" != "" ] ; then 1339 absolute_partition=`ResolveSoftlink $c_p` 1340 partition_mountpt=`tr -s '\t' ' ' < $MY_FSTAB | /bin/grep -w "$current_partition" | /bin/grep -vx " *#.*" | $AWK '{print $2}' | head -n1` 1341 1342 # This part tries to retrieve the correct device from a LABEL line in /etc/fstab 1343 # current_partition contains only first column of /etc/fstab 1344 if [ "`echo "$current_partition" | /bin/grep -f -i "LABEL="`" != "" ] ; then 1343 1345 str_to_find_fmt_with=$current_partition 1344 redhat_label=`echo "$current_partition" | cut -d'=' -f2` 1345 actual_dev=`mount -l | fgrep " [$redhat_label]" | cut -d' ' -f1` 1346 # partition_mountpt=$redhat_label 1347 current_partition=$actual_dev 1346 redhat_label=`echo "$current_partition" | /bin/cut -d'=' -f2` 1347 actual_dev="" 1348 1349 # 1st try : blkid, the good way 1350 if [ -x "/sbin/blkid" ] ; then 1351 actual_dev=`/sbin/blkid | /bin/grep "$current_partition" | /bin/cut -d':' -f1` 1352 fi 1353 1354 # 2nd try, which works on a standard partition (ext2/3), but not on swap 1355 if [ "x$actual_dev" = "x" ] ; then 1356 actual_dev=`/bin/mount -l | /bin/grep " [$redhat_label]" | /bin/cut -d' ' -f1` 1357 fi 1358 1359 # 3rd try, with vol_id (which works with swap) 1360 if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ] ; then 1361 list_swaps=`cat /proc/swaps | /bin/grep "/dev/" | /bin/awk '{ print $1 }' ` 1362 for dev_swap in $list_swaps ; do 1363 dev_exists=`/sbin/vol_id $dev_swap | /bin/grep "$redhat_label"` 1364 if [ "x$dev_exists" != "x" ] ; then 1365 actual_dev=$dev_swap 1366 break; 1367 fi 1368 done 1369 fi 1370 1371 # 4th try : pre-formated LABEL. Format is : LABEL=SWAP-mydevice. e.g. : LABEL=SWAP-hda5 1372 if [ "x$actual_dev" = "x" -a "`echo "$current_partition" | /bin/grep -i "LABEL=SWAP"`" != ""] ; then 1373 try_dev="`echo "$redhat_label" | /bin/cut -d '-' -f2`" 1374 present_dev="`/bin/cat /proc/swaps | /bin/grep -w /dev/$try_dev`" 1375 if [ "x$present_dev" != "x" ] ; then 1376 actual_dev="/dev/$try_dev" 1377 fi 1378 fi 1379 1380 # Check if one of all those tries has known success 1381 if [ "x$actual_dev" != "x" ] ; then 1382 current_partition=$actual_dev 1383 else 1384 Die "Your system uses a labelled swap partition, but you lack the tool to support it.\nPlease replace swap labels with their correct devices in /etc/fstab\n" 1385 fi 1348 1386 else 1349 1387 str_to_find_fmt_with=$current_partition 1350 1388 fi 1389 1351 1390 partition_format=`$AWK '$1 == "'"$str_to_find_fmt_with"'" {print $3}' $MY_FSTAB` 1352 1391 if [ -d "/proc/lvm" ] && [ "`lvdisplay $current_partition 2> /dev/null`" ] ; then … … 2217 2256 cp -f $TMP_ROOT/mountlist.txt $CACHE_LOC 2218 2257 [ "`DidMondoCallMe`" ] && cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MONDO_TMP/. 2219 [ -d "/proc/lvm" ] && $MINDI_ SBIN/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm2220 [ -d "/dev/mapper" ] && $MINDI_ SBIN/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm2258 [ -d "/proc/lvm" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm 2259 [ -d "/dev/mapper" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm 2221 2260 cat $minidir_root/$noof_disks/tmp/mountlist.txt >> $LOGFILE 2222 2261 ZipMinidirsIntoTarballs $minidir_root $tardir $noof_disks … … 2535 2574 root="/" 2536 2575 fi 2537 for fname in `find $root -maxdepth 2 -type f | fgrep lin | fgrep -v /proc/` ; do2576 for fname in `find $root -maxdepth 2 -type f | fgrep lin | egrep -v '^/proc/|^/net/'` ; do 2538 2577 [ ! -e "$fname" ] && continue 2539 2578 [ "$fname" = "/boot/vmlinuz.shipped" ] && [ -f "/boot/vmlinuz" ] && continue; # ignore SuSE's extra kernel … … 2695 2734 echo -en "..." 2696 2735 mkdir -p $mountpoint 2697 mount -t ext2 -o loop $tempfile $mountpoint || Die "Cannot loopmount $tempfile to $mountpoint "2736 mount -t ext2 -o loop $tempfile $mountpoint || Die "Cannot loopmount $tempfile to $mountpoint! The reason may be missing support for loopfs or ext2 (or both) in the running kernel." 2698 2737 echo -en "..." 2699 2738 old_pwd=`pwd` … … 3195 3234 else 3196 3235 if ! PrepareBootDiskImage_LILO $imagesdir 1722 $kernelpath $ramdisk_size ; then 3197 LogIt "Warning - failed to create 1.72MB boot image. Please reduce your kernel's size\n" 3198 LogIt "if you want to make a 1.72MB floppy disk.\n" 3199 fi 3200 PrepareBootDiskImage_LILO $imagesdir 2880 $kernelpath $ramdisk_size || Die "Failed to create 2.88MB floppy disk image." 3236 LogIt "Warning - failed to create 1.72MB boot image. Please reduce your kernel's size\n" 3237 LogIt "if you want to make a 1.72MB floppy disk.\n" 3238 fi 3239 if ! PrepareBootDiskImage_LILO $imagesdir 2880 $kernelpath $ramdisk_size ; then 3240 LogIt "Warning - failed to create 2.88MB floppy disk image.\n" 3241 LogIt "Please reduce your kernel's size\n" 3242 LogIt "if you want to make a 2.88MB floppy disk.\n" 3243 PrepareBootDiskImage_LILO $imagesdir 5760 $kernelpath $ramdisk_size || Die "Failed to create 2.88MB floppy disk image." 3244 fi 3201 3245 fi 3202 3246 else
Note:
See TracChangeset
for help on using the changeset viewer.