Changeset 1079 in MondoRescue
- Timestamp:
- Jan 28, 2007, 5:58:18 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 6 deleted
- 54 edited
- 6 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/mindi/analyze-my-lvm
r979 r1079 3 3 # $Id$ 4 4 # 5 6 #------------------------- ANALYZE-MY-LVM ----------------------- Hugo Rabson7 # 07/148 # - no longer blank first 4k of /dev/mdX9 #10 # 06/14/200411 # - fixed "n >= 2.00" bug (shell doesn't handle floating points properly)12 # - handle dm_mod as well as dm-mod13 #14 # 02/18/200415 # - nice patch to fix ListAllVolumeGroups() --- J. Richard16 # - patch to support LVM2 by Takeru Komoriya17 #18 # 10/15/200319 # - fixed '-L'-handling to allow for floating-point gigabyte values20 #21 # 01/15/200322 # - patch (LVM) by Brian Borgeson23 #24 # 12/10/200225 # - patch by Benjamin Mampaey26 #27 # 09/05/200228 # - additional patch by Ralph Gruwe29 #30 # 08/30/200231 # - modified by Ralph Gruwe32 #33 # 10/01/200134 # - last modified by Hugo :)35 #------------------------------------------------------------------------------36 5 37 6 Die() { … … 186 155 ListAllLogicalVolumes() { 187 156 if [ $lvmversion = 2 ]; then 188 $LVMCMD lvscan | grep "'" | cut -d"'" -f2189 else 190 lvscan | grep '"' | cut -d'"' -f2157 $LVMCMD lvscan 2> /dev/null | grep "'" | cut -d"'" -f2 158 else 159 lvscan 2> /dev/null | grep '"' | cut -d'"' -f2 191 160 fi 192 161 } -
trunk/mindi/distributions/conf/deplist.d/lvm.conf
r454 r1079 3 3 # Tools for LVM support 4 4 # 5 LVMFILES: 5 6 /etc/lvm/lvm.conf 6 7 /sbin/fsadm -
trunk/mindi/distributions/conf/mindi.conf.dist
r929 r1079 18 18 19 19 # 20 # deplist directory20 # Maximum compressed size for disk image in KB. 21 21 # 22 mindi_deplist_dir="/etc/mindi/deplist.d" 22 mindi_max_compressed_size=1300 23 24 # 25 # deplist file name (stored in $MINDI_CONF) 26 # 27 mindi_deplist_file="deplist.txt" 23 28 24 29 # … … 38 43 39 44 # 45 # Write mindi USB (yes|no) ? 46 # 47 mindi_write_usb="no" 48 49 # 50 # If set to "no", you will be prompted for whether or not 51 # you want to use your own kernel, or the supplied default. 52 # If "yes" mindi will automatically use your own kernel. 53 # 54 mindi_use_own_kernel="yes" 55 56 # 40 57 # Images creation dir 58 # WARNING: This directory is erased before usage 41 59 # 42 60 mindi_images_dir="/var/cache/mindi" … … 54 72 # 55 73 # Additional Boot Parameters 74 # You may want to remove acpi=off if you're unable to reboot on mindi's CD 75 # You may want to add ramdisk_size=1024 if on Fedora Core 5/6 56 76 # 57 77 mindi_boot_params="acpi=off apm=off devfs=nomount exec-shield=0 noresume selinux=0 barrier=off" 58 78 59 # TBC60 79 # 61 80 # Kernel to use (NATIVE|FAILSAFE|PATH TO THE KERNEL) … … 64 83 #mindi_kernel="/boot/vmlinuz.special" 65 84 66 # TBC 85 # 86 # Modules supported by mindi and required at boot time 87 # 88 mindi_scsi_mods="3w-xxxx 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 i2o_block i2o_core ide-scsi ieee1394 imm in2000 initio ips iscsi isp megaraid mptbase mptscsih mptsas mptspi mptfc mptscsi mptctl NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qla2200 qla2300 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" 89 mindi_ide_mods="ide ide-generic ide-detect ide-mod ide-disk ide-cd ide_cd ide-cs ide-core ide_core edd paride ata_piix libata via82cxxx generic nvidia ahci sata_nv cmd64x" 90 mindi_usb_mods="usb-storage usb-ohci usb-uhci usbcore usb_storage hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd usbkbd usbhid" 91 mindi_pcmcia_mods="pcmcia_core ds yenta_socket" 92 mindi_cdrom_mods="cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 sg sr_mod zlib_inflate" 93 mindi_tape_mods="ht st osst ide-tape ide_tape" 94 mindi_floppy_mods="ide-floppy floppy" 95 mindi_net_mods="sunrpc nfs nfs_acl lockd loop mii 3c59x e100 bcm5700 bnx2 e1000 eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 vmxnet vmnet" 96 mindi_extra_mods="vfat fat loop md-mod linear raid0 raid1 xor raid5 lvm-mod dm-mod dm-snapshot dm-zero dm-mirror jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd mbcache" 67 97 # 68 # 69 # Additinal modules to support 98 # Additional modules to support 70 99 # (white space separated list of modules) 71 100 # 72 mindi_additional_modules="" 73 74 # TBC 75 # 76 # 77 # Boot loader to use 78 # (GRUB|ELILO|LILO|RAW|NATIVE) 79 # 80 mindi_boot_loader="NATIVE" 101 mindi_additional_mods="" 81 102 82 103 # -
trunk/mindi/distributions/freebsd/pkg-plist
r1039 r1079 1 1 etc/mindi/deplist.txt 2 etc/mindi/mindi.conf 3 etc/mindi/mindi.conf.dist 4 etc/mindi/mindi.conf.dist.md5 2 5 doc/ChangeLog 3 6 doc/INSTALL … … 13 16 @dirrm lib/mindi 14 17 @dirrm etc/mindi 18 @dirrm etc/mindi/mindi.d -
trunk/mindi/distributions/rpm/mindi.spec
r939 r1079 60 60 %config(noreplace) %{_sysconfdir}/mindi/mindi.conf 61 61 %config(noreplace) %{_sysconfdir}/mindi/mindi.conf.dist 62 %config(noreplace) %{_sysconfdir}/mindi/mindi.conf.dist.md5 62 63 %doc ChangeLog INSTALL COPYING README TODO README.ia64 README.pxe README.busybox svn.log 63 64 %{_mandir}/man8/* -
trunk/mindi/install.sh
r939 r1079 72 72 echo "Copying files ..." 73 73 install -m 644 isolinux.cfg msg-txt sys-disk.raw.gz isolinux-H.cfg syslinux.cfg syslinux-H.cfg dev.tgz $locallib/mindi 74 install -m 644 deplist.txt $conf 74 install -m 644 distributions/conf/deplist.d/* $conf/deplist.d 75 install -m 444 distributions/conf/mindi.conf.dist $conf 76 # 77 # Compute mindi.conf.dist (cecked by mindi) to avoid changes here 78 # Modify the checksum file so that path is correct at execution time 79 # 80 md5sum $conf/mindi.conf.dist > $conf/mindi.conf.dist.md5 81 perl -pi -e "s~$conf~$subconf~" $conf/mindi.conf.dist.md5 82 # 83 # Example of mindi.conf 84 # 85 cat > $conf/mindi.conf << EOF 86 # 87 # Configuration file for mindi 88 # 89 # By default values are taken from $conf/mindi.conf.dist 90 # You can override them here 91 # 92 # e.g. 93 # 94 #mindi_tmp_dir="/var/tmp" 95 # 96 EOF 97 chmod 644 $conf/mindi.conf 75 98 install -m 644 distributions/conf/deplist.d/* $conf/deplist.d 76 99 install -m 444 distributions/conf/mindi.conf.dist $conf … … 89 112 chmod 644 $conf/mindi.conf 90 113 114 # 115 # Example of deplist.txt 116 # 117 cat > $conf/deplist.txt << EOF 118 # mindi additional dependency list 119 # 120 # NB: 121 # You have to give an absolute path 122 # If you want to add something, just add it on its own line. K.I.S.S. 123 124 EOF 125 chmod 644 $conf/deplist.txt 126 91 127 cp -af rootfs aux-tools $locallib/mindi 128 if [ -e FindDistroFailsafe ]; then 129 cp -af FindDistroFailsafe $locallib/mindi 130 fi 92 131 chmod 755 $locallib/mindi/rootfs/sbin/* 93 132 chmod 755 $locallib/mindi/aux-tools/sbin/* -
trunk/mindi/mindi
r1043 r1079 36 36 37 37 MINDI_CONFIG_DIST="$MINDI_CONF/mindi.conf.dist" 38 if [ ! -f $MINDI_CONFIG_CONF ]; then 39 echo "Unable to find $MINDI_CONFIG_CONF. Please reinstall mindi" 40 MindiExit -1 38 if [ ! -f $MINDI_CONFIG_DIST ]; then 39 echo "Unable to find $MINDI_CONFIG_DIST. Please reinstall mindi" 40 exit -1 41 fi 42 md5sum --status -c "$MINDI_CONF/mindi.conf.dist.md5" 43 if [ $? -ne 0 ]; then 44 echo "$MINDI_CONF/mindi.conf.dist md5 checksum incorrect. Please reinstall mindi" 45 exit -1 41 46 fi 42 47 . $MINDI_CONFIG_DIST … … 53 58 # Manages defaults coming from conf files 54 59 # 55 EXTRA_SPACE=$mindi_extra_space56 IA64_BOOT_SIZE=$mindi_ia64_boot_size57 DEPLIST_DIR="$mindi_deplist_dir"58 # TBC59 WRITE_BOOT_FLOPPIES="$mindi_write_boot_floppy"60 # TBC61 WRITE_MINDI_CD="$mindi_write_cd"62 # TBC63 CACHE_LOC="$mindi_images_dir"64 FORCE_DUAL_FLOPPIES="$mindi_dual_floppies"65 TMP_ROOT="$mindi_tmp_dir"66 FDDEVICE="$mindi_fd_device"67 ADDITIONAL_BOOT_PARAMS="$mindi_boot_params"68 MY_FSTAB="$mindi_etc_fstab"69 LOGFILE="$mindi_log_file"70 60 INTERACTIVE="$mindi_interactive" 71 61 … … 80 70 PROMPT_MAKE_CD_IMAGE="yes" 81 71 72 # Ask if you want to make a USB Image to be written? 73 # if this is set to 'no', then the image will be created automatically 74 PROMPT_MAKE_USB_IMAGE="yes" 75 82 76 # If set to "no", you will be prompted for whether or not 83 77 # you want to use your own kernel, or the supplied default. 84 78 # If "yes" mindi will automatically use your own kernel. 85 79 USE_OWN_KERNEL="no" 86 else87 PROMPT_WRITE_BOOT_FLOPPIES="no"88 PROMPT_MAKE_CD_IMAGE="no"89 USE_OWN_KERNEL="yes"90 80 fi 91 81 92 FLOPPY_MODS="ide-floppy floppy" 93 TAPE_MODS="ht st osst ide-tape ide_tape" 94 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 i2o_block i2o_core ide-scsi ieee1394 imm in2000 initio ips iscsi isp megaraid mptbase mptscsih NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qla2200 qla2300 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" 95 IDE_MODS="ide ide-generic ide-detect ide-mod ide-disk ide-cd ide_cd ide-cs ide-core ide_core libata edd paride ata_piix libata via82cxxx generic nvidia ahci" 96 PCMCIA_MODS="pcmcia_core ds yenta_socket" 97 USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd usbkbd usbhid" 98 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" 99 NET_MODS="sunrpc nfs nfs_acl lockd loop mii 3c59x e100 bcm5700 bnx2 e1000 eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 vmxnet vmnet" 100 NET_MODS="sunrpc nfs nfs_acl lockd loop mii 3c59x e100 bcm5700 bnx2 e1000 eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 vmxnet vmnet" 101 EXTRA_MODS="$CDROM_MODS vfat fat loop md-mod linear raid0 raid1 xor raid5 lvm-mod dm-mod dm-snapshot dm-zero dm-mirror jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd mbcache" 82 EXTRA_SPACE=$mindi_extra_space 83 IA64_BOOT_SIZE=$mindi_ia64_boot_size 84 DEPLIST_DIR="$MINDI_CONF/deplist.d" 85 DEPLIST_FILE="$MINDI_CONF/$mindi_deplist_file" 86 WRITE_BOOT_FLOPPIES="$mindi_write_boot_floppy" 87 PROMPT_MAKE_CD_IMAGE="$mindi_write_cd" 88 PROMPT_MAKE_USB_IMAGE="$mindi_write_usb" 89 USE_OWN_KERNEL="$mindi_use_own_kernel" 90 CACHE_LOC="$mindi_images_dir" 91 FORCE_DUAL_FLOPPIES="$mindi_dual_floppies" 92 TMPDIR="$mindi_tmp_dir" 93 FDDEVICE="$mindi_fd_device" 94 ADDITIONAL_BOOT_PARAMS="$mindi_boot_params" 95 MY_FSTAB="$mindi_etc_fstab" 96 LOGFILE="$mindi_log_file" 97 FLOPPY_MODS="$mindi_floppy_mods" 98 TAPE_MODS="$mindi_tape_mods" 99 SCSI_MODS="$mindi_scsi_mods" 100 IDE_MODS="$mindi_ide_mods" 101 PCMCIA_MODS="$mindi_pcmcia_mods" 102 USB_MODS="$mindi_usb_mods" 103 CDROM_MODS="$TAPE_MODS $FLOPPY_MODS $IDE_MODS $mindi_cdrom_mods $USB_MODS $PCMCIA_MODS" 104 NET_MODS="$mindi_net_mods" 105 EXTRA_MODS="$CDROM_MODS $mindi_extra_mods $mindi_additional_mods" 102 106 103 107 BOOT_MEDIA_MESSAGE="$mindi_boot_msg" 104 108 FDISK=$MINDI_SBIN/parted2fdisk 105 106 # Using a config file allow to overwrite some values107 MINDI_CONFIG="$MINDI_CONF/mindi.conf"108 if [ -f $MINDI_CONFIG ]; then109 . $MINDI_CONFIG110 fi111 109 112 110 # Now we can create what we nedd … … 215 213 echo "Added kbd map $mappath" >> $LOGFILE 216 214 if [ ! -e "$mappath" ] ; then 217 mappath=`find $KEYDIR/keymaps | grep "i[3-8]86"| grep "$locale[^r][^/]" | grep -vx " *#.*"`215 mappath=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep "$locale[^r][^/]" | grep -vx " *#.*"` 218 216 if [ ! -e "$mappath" ] ; then 219 217 LogIt "Cannot add $mappath: kbd map file not found" … … 233 231 for included_item in $included_list ; do 234 232 if [ ! -e "$included_item" ] ; then 235 sss=`find $KEYDIR/keymaps | grep -F "${included_item}.inc"`236 [ "$sss" = "" ] && sss=` find $KEYDIR/keymaps | grep -F "$included_item"`233 sss=`grep -F "${included_item}.inc" $MINDI_TMP/keymaps.find` 234 [ "$sss" = "" ] && sss=`grep -F "$included_item" $MINDI_TMP/keymaps.find` 237 235 for ii in $sss ; do 238 236 [ -e "$ii" ] && AddKeyboardMappingFile $ii … … 252 250 biggienumber=$4 253 251 254 [ -d "$filename" ] && Die "Cannot chop up $filename: it's a directory. Please amend deplist fileaccordingly."252 [ -d "$filename" ] && Die "Cannot chop up $filename: it's a directory. Please amend $DEPLIST_FILE accordingly." 255 253 mkdir -p $outdir 256 254 … … 411 409 mkdir -p $mountpoint 412 410 dd if=/dev/zero of=$imagefile bs=1k count=1440 &> /dev/null || LogIt "Cannot dd (CODI)" 411 echo "Creating ext2 filesystem on $imagefile" >> $LOGFILE 413 412 mke2fs -N 12 -F $imagefile >> $LOGFILE 2>> $LOGFILE 414 413 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." … … 416 415 if [ "$?" -ne "0" ] ; then 417 416 umount $mountpoint 418 Die "Tarball $tarball is too big for disk! (CODI)\n Tell Dev Team to adjust MAX_COMPRESSED_SIZE"417 Die "Tarball $tarball is too big for disk! (CODI)\nAdjust mindi_max_compressed_size in your $MINDI_CONFIG" 419 418 fi 420 419 [ "$diskno" -eq "$noof_disks" ] && echo "This is the last disk ($diskno=$noof_disks)" >> $mountpoint/LAST-DISK 421 420 umount $mountpoint || LogIt "Cannot umount (CODI)" 422 421 rmdir $mountpoint || LogIt "Cannot rmdir (CODI)" 423 }424 425 426 DidMondoCallMe() {427 local res428 429 res=0430 [ "`ps ax | grep -F "mondoarchive" | grep -v "grep"`" ] && res=$(($res+1))431 [ -f "/var/run/monitas-mondo.pid" ] && res=$(($res+1))432 [ "$res" -gt "1" ] && echo "yes"433 422 } 434 423 … … 463 452 464 453 # Creates a tar file containing all required files 465 for i in /etc/fstab/etc/lilo.conf /etc/raidtab $LOGFILE /var/log/mondo-archive.log ; do454 for i in $MY_FSTAB /etc/lilo.conf /etc/raidtab $LOGFILE /var/log/mondo-archive.log ; do 466 455 [ -e "$i" ] && cp -f $i $MINDI_TMP 2>> $LOGFILE 467 456 done … … 557 546 [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'` # Slackware 558 547 echo "locale=$locale" >> $LOGFILE 559 mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep -F "/${locale}." | grep -vx " *#.*"` 560 [ ! "$mp" ] && mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep "$locale[^r][^/]" | grep -vx " *#.*"` 548 # 549 # Process the keymaps dir once for all 550 # AddKeyboardMappingFile will use it recursively 551 # 552 find $KEYDIR/keymaps > $MINDI_TMP/keymaps.find 553 mp=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep -F "/${locale}." | grep -vx " *#.*"` 554 [ ! "$mp" ] && mp=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep "$locale[^r][^/]" | grep -vx " *#.*"` 561 555 # If we have multiple keymaps then log it !! 562 556 echo "$mp" | grep -q " " … … 773 767 [ "$modres" -eq "3" ] && echo -en "\t|" 774 768 done 775 if [ "`DidMondoCallMe`" ]; then769 if [ _"$MONDO_SHARE" != _"" ]; then 776 770 mkdir -p $bigdir/tmp 777 771 mkdir -p $bigdir/sbin … … 962 956 echo "Problem with dead link on $file -> $link" >> $LOGFILE 963 957 fi 964 if [ "`echo $link | cut -c1`" = "/" ]; then 965 echo "$link `ReadAllLink $link`" 966 else 967 d=`dirname $file` 968 echo "$link `ReadAllLink $d/$link`" 969 fi 958 if [ -h "$d" ]; then 959 echo "$link $d" 960 else 961 echo "$link" 962 fi 970 963 } 971 964 … … 1252 1245 current_partition=$actual_dev 1253 1246 else 1254 Die "Your system uses a LABEL partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in /etc/fstabor install findfs|blkid|vol_id"1247 Die "Your system uses a LABEL partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in $MY_FSTAB or install findfs|blkid|vol_id" 1255 1248 fi 1256 1249 # This part tries to retrieve the correct device from a UUID line in /etc/fstab … … 1300 1293 current_partition=$actual_dev 1301 1294 else 1302 Die "Your system uses a UUID partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in /etc/fstabor install findfs|blkid|vol_id"1295 Die "Your system uses a UUID partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in $MY_FSTAB or install findfs|blkid|vol_id" 1303 1296 fi 1304 1297 else … … 1530 1523 OfferToMakeBootableISO() { 1531 1524 local i old_pwd 1532 if [ "$PROMPT_MAKE_CD_IMAGE" = "yes" ] && [ ! "`DidMondoCallMe`" ]; then1525 if [ "$PROMPT_MAKE_CD_IMAGE" = "yes" ] && [ _"$MONDO_SHARE" = _"" ]; then 1533 1526 echo -en "Shall I make a bootable CD image? (y/[n]) " 1534 1527 read i … … 1536 1529 fi 1537 1530 if [ ! "$MINDI_TMP" ] ; then 1538 LogIt "NB: Mindi's bootable CD always uses isolinux ."1531 LogIt "NB: Mindi's bootable CD always uses isolinux or elilo." 1539 1532 LogIt "For a bootable CD w/LILO, please use Mondo." 1540 1533 fi … … 1552 1545 cp -f $j $k 2> /dev/null || Die "Failed to copy $j to $k" 1553 1546 cp -f $j $MINDI_TMP 2> /dev/null || Die "Failed to copy $j to $MINDI_TMP" 1554 cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT" 1547 if [ _"$MONDO_SHARE" != _"" ]; then 1548 cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT" 1549 fi 1555 1550 fi 1556 1551 done 1557 1552 MakeSyslinuxMessageFile $MINDI_TMP/iso/isolinux/message.txt 1558 cp $kernelpath $MINDI_TMP/iso/isolinux/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MINDI_TMP/iso/isolinux/vmlinuz). Did you run out of disk space?" 1559 cp $kernelpath $MONDO_ROOT/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?" 1553 cp $kernelpath $MINDI_TMP/iso/isolinux/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mindi tmp ($MINDI_TMP/iso/isolinux/vmlinuz). Did you run out of disk space?" 1560 1554 cp $MINDI_TMP/mindi.rdz $MINDI_TMP/iso/isolinux/initrd.img 2>> $LOGFILE 1561 cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2>> $LOGFILE 1555 if [ _"$MONDO_SHARE" != _"" ]; then 1556 cp $kernelpath $MONDO_ROOT/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?" 1557 cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2> /dev/null || Die "Cannot copy mindi.rdz ($MINDI_TMP/mindi.rdz) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?" 1558 1559 fi 1562 1560 [ -e "$iso_cfg_file" ] || Die "FIXME - unable to find $iso_cfg_file - this should never occur" 1563 1561 cd $MINDI_TMP/iso/isolinux 1564 cat $iso_cfg_file | HackSyslinuxFile $ramdisk_size $MINDI_TMP/iso > isolinux.cfg || Die "Cannot copy isolinux.cfg from mindi_home to tmp_root- did you run out of disk space?"1562 cat $iso_cfg_file | HackSyslinuxFile $ramdisk_size $MINDI_TMP/iso > isolinux.cfg || Die "Cannot copy isolinux.cfg to $MINDI_TMP/iso/isolinux - did you run out of disk space?" 1565 1563 if [ -e "$MINDI_TMP/NFS-DEV" ] ; then 1566 mv isolinux.cfg isolinux.cfg.old 1567 sed s/interactive/iso/ isolinux.cfg.old > isolinux.cfg 1564 perl -pi -e 's/interactive/iso/' isolinux.cfg 1568 1565 fi 1569 1566 if [ "$ARCH" != "ia64" ] ; then 1570 cp $ISOLINUX isolinux.bin 2> /dev/null || Die "Cannot copy isolinux.bin ($ISOLINUX) to tmp_root- did you run out of disk space?"1567 cp $ISOLINUX isolinux.bin 2> /dev/null || Die "Cannot copy isolinux.bin ($ISOLINUX) to $MINDI_TMP/iso/isolinux - did you run out of disk space?" 1571 1568 cp $ISOLINUX ../ 2>> $LOGFILE 1572 1569 fi 1573 1570 cd $MINDI_TMP/iso 1574 1571 if [ "$ARCH" != "ia64" ] ; then 1575 cp -f $MINDI_TMP/iso/isolinux/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_ROOT 2> /dev/null || Die "Cannot copy core files to ramdisk for boot disk. Did you run out of disk space?"1576 fi1577 [ "$MONDO_SHARE" ] && cp -f $MONDO_SHARE/autorun .2>> $LOGFILE1578 if [ "$ARCH" != "ia64" ] ; then1572 if [ _"$MONDO_SHARE" != _"" ]; then 1573 cp -f $MINDI_TMP/iso/isolinux/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_ROOT 2> /dev/null || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?" 1574 cp -f $MONDO_SHARE/autorun . 2>> $LOGFILE 1575 fi 1579 1576 mkisofs -U -J -r -o $CACHE_LOC/mindi.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . > /dev/null 2> $MINDI_TMP/mkisofs.log 1580 1577 else … … 1595 1592 1596 1593 1594 OfferToMakeBootableUSB() { 1595 local i old_pwd 1596 if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ _"$MONDO_SHARE" = _"" ]; then 1597 echo "Shall I make a bootable USB image ?" 1598 echo -en "WARNING: This will erase all content on $USBDEV (y/[n]) " 1599 read i 1600 [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0 1601 fi 1602 rm -Rf $MINDI_TMP/usb 1603 mkdir -p $MINDI_TMP/usb 1604 USBPART="${USBDEV}1" 1605 1606 echo -en "Transforming $USBDEV in a Bootable device " 1607 echo -en "." 1608 echo "Transforming $USBDEV in a Bootable device" >> $LOGFILE 1609 echo "Checking $USBDEV" >> $LOGFILE 1610 $FDISK -l $USBDEV 2>&1 >> $LOGFILE 1611 if [ $? -ne 0 ]; then 1612 echo "Unable to access $USBDEV" | tee -a $LOGFILE 1613 echo "Make sure your USB device is pluged in" | tee -a $LOGFILE 1614 MindiExit -1 1615 fi 1616 echo -en "." 1617 echo "Erasing $USBDEV" >> $LOGFILE 1618 $FDISK $USBDEV 2>&1 >> $LOGFILE << EOF 1619 d 1620 d 1621 d 1622 d 1623 n 1624 p 1625 1 1626 1627 1628 t 1629 b 1630 a 1631 1 1632 w 1633 EOF 1634 if [ $? -ne 0 ]; then 1635 echo "Unable to create a vfat Filesystem on $USBDEV" | tee -a $LOGFILE 1636 echo "Make sure your USB device is pluged in" | tee -a $LOGFILE 1637 $FDISK -l $USBDEV 2>&1 | tee -a $LOGFILE 1638 MindiExit -1 1639 fi 1640 echo -en "." 1641 echo "Creating a vfat filesystem on $USBPART" >> $LOGFILE 1642 mkfs -t vfat $USBPART 2>&1 >> $LOGFILE 1643 if [ $? -ne 0 ]; then 1644 echo "Unable to create a vfat filesystem on $USBPART" | tee -a $LOGFILE 1645 echo "Make sure your USB device is pluged in and partitioned ($USBPART must exist on it)" | tee -a $LOGFILE 1646 $FDISK -l $USBDEV 2>&1 | tee -a $LOGFILE 1647 MindiExit -1 1648 fi 1649 echo -en "." 1650 echo "Mounting $USBPART on $MINDI_TMP/usb" >> $LOGFILE 1651 mount $USBPART $MINDI_TMP/usb 2>> $LOGFILE 1652 if [ $? -ne 0 ]; then 1653 echo "Unable to mount $USBPART on $MINDI_TMP/usb" | tee -a $LOGFILE 1654 echo "Make sure your USB device is pluged in, partitioned and formated ($USBPART must exist on it)" | tee -a $LOGFILE 1655 $FDISK -l $USBDEV 2>&1 | tee -a $LOGFILE 1656 MindiExit -1 1657 fi 1658 echo -en "." 1659 mkdir -p $MINDI_TMP/usb/{images,archives} 1660 cp -f $1/*.img $1/*.gz $MINDI_TMP/usb/images 2>> $LOGFILE || LogIt "OfferToMakeBootableUSB: Cannot copy $i to $MINDI_TMP/iso/images" 1661 echo -en "." 1662 old_pwd=`pwd` 1663 cd $MINDI_TMP/usb 1664 echo "mindi_lib = $MINDI_LIB" >> $LOGFILE 1665 for i in memdisk memtest.bin memtest.img ; do 1666 j=$MINDI_LIB/$i 1667 k=$MINDI_TMP/usb 1668 if [ -e "$j" ] ; then 1669 LogIt "Copying $j to $k" 1670 cp -f $j $k 2> /dev/null || Die "Failed to copy $j to $k" 1671 cp -f $j $MINDI_TMP 2> /dev/null || Die "Failed to copy $j to $MINDI_TMP" 1672 if [ _"$MONDO_SHARE" != _"" ]; then 1673 cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT" 1674 fi 1675 fi 1676 done 1677 echo -en "." 1678 MakeSyslinuxMessageFile $MINDI_TMP/usb/message.txt 1679 echo -en "." 1680 cp $kernelpath $MINDI_TMP/usb/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mindi tmp ($MINDI_TMP/usb/syslinux/vmlinuz). Did you run out of disk space?" 1681 echo -en "." 1682 cp $MINDI_TMP/mindi.rdz $MINDI_TMP/usb/initrd.img 2>> $LOGFILE 1683 echo -en "." 1684 if [ _"$MONDO_SHARE" != _"" ]; then 1685 cp $kernelpath $MONDO_ROOT/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?" 1686 cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2> /dev/null || Die "Cannot copy mindi.rdz ($MINDI_TMP) to mondo root ($MONDO_ROOT/initrd.img). Did you run out of disk space?" 1687 1688 fi 1689 echo -en "." 1690 [ -e "$iso_cfg_file" ] || Die "FIXME - unable to find $iso_cfg_file - this should never occur" 1691 cat $sys_cfg_file | HackSyslinuxFile $ramdisk_size $MINDI_TMP/usb > syslinux.cfg || Die "Cannot copy syslinux.cfg from mindi_home to $MINDI_TMP/usb - did you run out of disk space?" 1692 echo -en "." 1693 if [ -e "$MINDI_TMP/NFS-DEV" ] ; then 1694 perl -pi -e 's/interactive/iso/' syslinux.cfg 1695 fi 1696 cd $old_pwd 1697 echo -en "." 1698 if [ "$ARCH" != "ia64" ] ; then 1699 if [ _"$MONDO_SHARE" != _"" ]; then 1700 cp -f $MINDI_TMP/usb/{syslinux.cfg,initrd.img,vmlinuz,message.txt} $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?" 1701 cp -f $MONDO_SHARE/autorun $MONDO_ROOT 2>> $LOGFILE 1702 fi 1703 umount $MINDI_TMP/usb 1704 syslinux $USBPART 2>> $MINDI_TMP/syslinux.log 1705 else 1706 echo "No USB boot support for ia64" | tee -a $LOGFILE 1707 umount $MINDI_TMP/usb 1708 MindiExit -1 1709 fi 1710 echo -en "." 1711 if [ "$?" -ne "0" ] ; then 1712 echo "----------- syslinux's errors --------------" |tee -a $LOGFILE 1713 cat $MINDI_TMP/syslinux.log |tee -a $LOGFILE 1714 LogIt "Failed to create USB image." 1715 else 1716 echo -e "$DONE" 1717 echo "Created bootable USB image on $USBDEV" >> $LOGFILE 1718 fi 1719 rm -f $MINDI_TMP/syslinux.log 1720 } 1721 1722 1597 1723 PluralOrNot() { 1598 1724 [ "$1" -gt "1" ] && echo -en "s" … … 1609 1735 fi 1610 1736 if [ "$disksize" -gt "2880" ] ; then 1611 if [ "`DidMondoCallMe`" ]; then1737 if [ _"$MONDO_SHARE" != _"" ]; then 1612 1738 if [ "$CDRECOVERY" != "yes" ] ; then 1613 1739 if [ -e "$MINDI_TMP/NFS-DEV" ] ; then … … 1642 1768 mtpt=$MINDI_TMP/$rand1.$rand2.mtpt 1643 1769 dd if=/dev/zero of=$image bs=1k count=$disksize &> /dev/null 1770 echo "Creating ext2 filesystem on $image" >> $LOGFILE 1644 1771 mke2fs -N 26 -F $image &> /dev/null 1645 1772 mkdir -p $mtpt … … 1704 1831 if [ "$CDRECOVERY" = "yes" ] ; then 1705 1832 echo -en "default=RESTORE\n" 1706 elif [ "$disksize" -gt "2880" ] && [ "`DidMondoCallMe`" ]; then1833 elif [ "$disksize" -gt "2880" ] && [ _"$MONDO_SHARE" != _"" ]; then 1707 1834 if [ -e "$MINDI_TMP/NFS-DEV" ] ; then 1708 1835 echo -en "default=iso\n" … … 1725 1852 options="RESTORE expert" 1726 1853 elif [ "$disksize" -gt "2880" ] ; then 1727 if [ "`DidMondoCallMe`" ]; then1854 if [ _"$MONDO_SHARE" != _"" ]; then 1728 1855 if [ -e "$MINDI_TMP/NFS-DEV" ] ; then 1729 1856 options="iso" … … 1746 1873 rootpart="" 1747 1874 fi 1748 outstr="image= vmlinuz\n\tlabel=$i\n\tinitrd=/mindi.rdz\n\t${rootpart}append=\" rw ramdisk=$ramdisksize ramdisk_size=$ramdisksize maxcpus=1 $ooo_mode $ADDITIONAL_BOOT_PARAMS"1875 outstr="image=/vmlinuz\n\tlabel=$i\n\tinitrd=/mindi.rdz\n\t${rootpart}append=\" rw ramdisk=$ramdisksize ramdisk_size=$ramdisksize maxcpus=1 $ooo_mode $ADDITIONAL_BOOT_PARAMS" 1749 1876 1750 1877 outstr=$outstr" $ooo_mode" … … 1782 1909 t=vfat 1783 1910 else 1911 echo "Creating ext2 filesystem on $imagefile" >> $LOGFILE 1784 1912 mke2fs -N 26 -m 0 -F $imagefile >> $LOGFILE 2>> $LOGFILE 1785 1913 t=ext2 … … 1804 1932 1805 1933 MakeLiloConfFile $disksize > $liloconf 1934 1935 # Copy it so that CD-ROM menu entry is satisfied 1936 if [ "$ARCH" = "ia64" ] ; then 1937 mountefi=0 1938 df -T | grep /boot/efi | grep -q vfat 1939 if [ $? -ne 0 ]; then 1940 mount /boot/efi 1941 if [ $? -ne 0 ]; then 1942 echo "You have to mount your EFI partition when using mindi" 1943 MindiExit -1 1944 fi 1945 mountefi=1 1946 fi 1947 cp /boot/efi/elilo.efi $mountpoint 1948 cp $liloconf $mountpoint/elilo.efi $mountpoint/efi/boot 1949 if [ $mountefi -eq 1 ]; then 1950 umount /boot/efi 2>&1 > /dev/null 1951 fi 1952 fi 1806 1953 1807 1954 echo "Copying $MINDI_TMP/mindi.rdz to $mountpoint..." >> $LOGFILE … … 1935 2082 else 1936 2083 dd if=/dev/zero of=$imagefile bs=1k count=$disksize &> /dev/null || Die "Cannot dd blank file" 2084 echo "Creating vfat filesystem on $imagefile" >> $LOGFILE 1937 2085 mkfs.vfat $imagefile >> $LOGFILE 2>> $LOGFILE 1938 2086 syslinux $imagefile >> $LOGFILE 2>> $LOGFILE … … 1947 2095 cat $sys_cfg_file | HackSyslinuxFile $ramdisk_size $mountpoint > syslinux.cfg || Die "Cannot copy syslinux.cfg from mindi_home to tmp_root" 1948 2096 if [ -e "$MINDI_TMP/NFS-DEV" ] ; then 1949 mv syslinux.cfg syslinux.cfg.orig 1950 sed s/interactive/iso/ syslinux.cfg.orig > syslinux.cfg 2097 perl -pi -e 's/interactive/iso/' syslinux.cfg 1951 2098 fi 1952 2099 cd $old_pwd … … 2023 2170 2024 2171 PrepareDataDiskImages() { 2025 local needlist bigdir minidir_root tardir diskdir imagesdir res i j k old_pwd lines 2172 local needlist bigdir minidir_root tardir diskdir imagesdir res i j k old_pwd lines lfiles 2026 2173 2027 2174 imagesdir=$1 … … 2034 2181 tardir=$MINDI_TMP/tardir 2035 2182 2036 lines=`grep -vx " *#.*" $MINDI_CONF/deplist.txt | grep -vx "" | wc -l` 2037 cat $MINDI_CONF/deplist.txt | GenerateGiantDependencyList $needlist $lines 2183 if [ -e "$DEPLIST_FILE" ]; then 2184 lfiles="$DEPLIST_FILE $DEPLIST_DIR/*" 2185 else 2186 lfiles="$DEPLIST_DIR/*" 2187 fi 2188 lines=`grep -vx " *#.*" $lfiles | grep -vx "" | wc -l` 2189 cat $lfiles | GenerateGiantDependencyList $needlist $lines 2038 2190 res=$? 2039 2191 if [ "$YOUR_KERNEL_SUCKS" ]; then … … 2071 2223 FindAndAddUserKeyboardMappingFile 2072 2224 mkdir -p $bigdir/tmp 2073 if [ "`DidMondoCallMe`" ]; then2225 if [ _"$MONDO_SHARE" != _"" ]; then 2074 2226 MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg 2075 2227 cp -f $MINDI_TMP/mondo-restore.cfg $bigdir/tmp &> /dev/null … … 2109 2261 tar -zxf $MINDI_LIB/x11-tools.tgz 2>> $LOGFILE || LogIt "WARNING - error occurred while unzipping x11-tools.tgz" 2110 2262 fi 2111 if [ -e "$MONDO_SHARE/restore-scripts" ] 2263 if [ -e "$MONDO_SHARE/restore-scripts" ]; then 2112 2264 cp -Rdf $MONDO_SHARE/restore-scripts/* . 2>> $LOGFILE 2113 [ "$?" -ne "0" ] && [ "`DidMondoCallMe`" ] &&Die "Cannot find/install $MONDO_SHARE/restore-scripts"2265 [ "$?" -ne "0" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts" 2114 2266 fi 2115 2267 [ -d "/lib/dev-state" ] && cp --parents -pRdf /lib/dev-state . 2>> $LOGFILE … … 2120 2272 noof_disks=$? 2121 2273 [ "$noof_disks" -eq "0" ] && Die "Too much stuff!" 2122 # if [ "$noof_disks" -ge "8" ] ; then2123 # LogIt "You are putting a ludicrously large amount of data on these disks."2124 # LogIt "I shall therefore double EXTRA_SPACE, just in case your ramdisk is too small."2125 # EXTRA_SPACE=$(($EXTRA_SPACE*2))2126 # fi2127 2274 MakeMountlist $MINDI_TMP/mountlist.txt 2128 2275 mkdir -p $minidir_root/$noof_disks/tmp 2129 2276 cp -f $MINDI_TMP/mountlist.txt $minidir_root/$noof_disks/tmp/mountlist.txt 2> /dev/null || Die "Cannot copy mountlist.txt from $MINDI_TMP to data disk" 2130 [ "`DidMondoCallMe`" ] && cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MINDI_TMP/. 2>> $LOGFILE 2277 if [ _"$MONDO_SHARE" != _"" ]; then 2278 cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MINDI_TMP/. 2>> $LOGFILE 2279 fi 2131 2280 [ $LVM != "false" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm || LVM="false" 2132 2281 cat $minidir_root/$noof_disks/tmp/mountlist.txt >> $LOGFILE … … 2498 2647 dd if=/dev/zero of=$tempfile bs=1k count=$ramdisk_size &> /dev/null || Die "Not enough room for temporary ramdisk (TurnTgzIntoRdz)" 2499 2648 echo -en "..." 2649 echo "Creating ext2 filesystem on $tempfile" >> $LOGFILE 2500 2650 mke2fs -b 1024 -m 1 -i 2048 -F $tempfile >> $LOGFILE 2>> $LOGFILE 2501 2651 echo -en "..." … … 2590 2740 dd if=/dev/zero of=$mountpoint/zero &> /dev/null 2591 2741 rm -f $mountpoint/zero 2592 if [ "`DidMondoCallMe`" ]; then2742 if [ _"$MONDO_SHARE" != _"" ]; then 2593 2743 MakeMondoConfigFile $mountpoint/tmp/mondo-restore.cfg 2594 2744 cp -f $mountpoint/tmp/mondo-restore.cfg $MINDI_TMP &> /dev/null … … 2648 2798 cd $minidir_root/all 2649 2799 size_of_all_tools=`du -sk . | cut -f1` 2650 if [ "`DidMondoCallMe`" ]; then2800 if [ _"$MONDO_SHARE" != _"" ]; then 2651 2801 for q in filelist.full.gz biggielist.txt ; do 2652 2802 [ ! -e "$MINDI_TMP/$q" ] && Die "Cannot find $MINDI_TMP/$q" … … 2671 2821 2672 2822 2673 if [ "$1" = "- printvar" ] ; then2823 if [ "$1" = "--printvar" ] ; then 2674 2824 shift 2675 2825 if [ _"$1" != _"" ] ; then 2676 2826 set | egrep "^$1" | cut -d= -f2 2677 2827 fi 2678 exit 02828 MindiExit 0 2679 2829 fi 2680 2830 … … 2740 2890 fi 2741 2891 2742 [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1` 2892 # If we have a distribution-specific script for finding a FAILSAFE kernel, use it. 2893 if [ -f "$MINDI_LIB/FindDistroFailsafe" ] && [ ! "$1" = "--makemountlist" ] && [ "$kernelpath" = "FAILSAFE" ]; then 2894 source $MINDI_LIB/FindDistroFailsafe 2895 # Log kernel image 2896 LogIt "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)" 2897 else 2898 [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1` 2899 fi 2743 2900 2744 2901 if ! which mkfs.vfat &> /dev/null ; then … … 2758 2915 FindLiloBinary 2759 2916 fi 2760 # BERLIOS: Remove as too dangerous and now useless2761 #grep -F " $MINDI_TMP " /proc/mounts | grep -F tmpfs > /dev/null 2> /dev/null && MINDI_TMP=/home/tmpmondo && mkdir -p $MINDI_TMP && LogIt "Changing MINDI_TMP to $MINDI_TMP because you're using tmpfs for /tmp\n" ; # tmpfs doesn't like Mindi and /tmp, for some reason2762 2917 trap "Aborted" SIGTERM 2763 2918 DONE="\r\t\t\t\t\t\t\t\tDone. " 2764 2919 CHOPSIZE=240 2765 2920 BIGNO=0 2766 MAX_COMPRESSED_SIZE=1300 2767 kernelpath="" 2768 MONDO_ROOT=/var/cache/mondo 2769 mkdir -p $MONDO_ROOT 2921 MAX_COMPRESSED_SIZE="$mindi_max_compressed_size" 2922 kernelpath="$mindi_kernel" 2923 if [ "$kernelpath" = "NATIVE" ]; then 2924 kernelpath="" 2925 fi 2926 if [ "$ARCH" = "ia64" ] ; then 2927 USE_LILO=yes 2928 else 2929 USE_LILO=no 2930 fi 2770 2931 2771 2932 if [ -d "/proc/lvm" ]; then … … 2790 2951 lsmod >> $LOGFILE 2791 2952 echo "-------------" >> $LOGFILE 2792 2793 if [ "$#" -ge "2" ] ; then 2794 if [ "$1" = "--max-compressed-size" ] ; then 2795 MAX_COMPRESSED_SIZE=$2 2796 shift; shift 2797 fi 2798 fi 2953 echo "Liste of extra modules is:" >> $LOGFILE 2954 echo "$EXTRA_MODS" >> $LOGFILE 2955 echo "-------------" >> $LOGFILE 2956 2799 2957 2800 2958 FLOPPY_WAS_MOUNTED="" … … 2806 2964 done 2807 2965 2966 # 2967 # If we have a USB device we need to store info 2968 # and remove it from the parameters line 2969 # 2970 if [ "$#" -ne "0" ] ; then 2971 if [ "$1" = "--usb" ] ; then 2972 shift 2973 USBDEV=$1 2974 if [ _"$USBDEV" = _"" ]; then 2975 Die "No USB device specified" 2976 fi 2977 shift 2978 fi 2979 fi 2980 2981 # 2982 # Deal with parameters 2983 # 2808 2984 if [ "$#" -ne "0" ] ; then 2809 2985 if [ "$1" = "--findkernel" ] ; then … … 2823 2999 MindiExit 0 2824 3000 elif [ "$#" -ge "9" ] && [ "$1" = "--custom" ] ; then 3001 if [ _"$MONDO_SHARE" = _"" ]; then 3002 Die "--custom is reserved for mondoarchive calls" 3003 fi 2825 3004 MONDO_TMP=$2 2826 3005 # Change MINDI_TMP for the one provided by mondo … … 2837 3016 kernelpath=$4; [ "$kernelpath" = "(null)" ] && kernelpath="" 2838 3017 ### 2839 ### Sq-Modification...2840 3018 ### Attempt to locate kernel specific module path 2841 3019 ### if module path is found then use it other wise use uname -r to set it... 2842 3020 ### 3021 if [ "$kernelpath" = "" ]; then 3022 kernelpath=`TryToFindKernelPath` 3023 fi 2843 3024 kernelname=`echo $kernelpath | cut -d'-' -f2-` 2844 3025 LogIt "kernelname = $kernelname" … … 2852 3033 LogIt "Using modules for kernel: ${kernelname}" 2853 3034 fi 2854 ###2855 ### end of Sq-Modification2856 ###2857 3035 TAPEDEV=$5 2858 3036 TAPESIZE=$6 … … 2883 3061 [ "$NOT_BOOT" = "" ] && NOT_BOOT=no 2884 3062 [ "$TAPEDEV" ] && LogIt "This is a tape-based backup. Fine." 2885 [ "$kernelpath" = "" ] && kernelpath=`TryToFindKernelPath`2886 kernelname=`echo $kernelpath | cut -d'-' -f2-`2887 if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ]2888 then2889 LogIt "Module path for ${kernelpath} not found..."2890 LogIt "using running kernel\'s modules."2891 kernelname=`uname -r`2892 else2893 LogIt "Using modules for kernel: ${kernelname}"2894 fi2895 3063 [ "$CDRECOVERY" = "yes" ] && [ "$TAPEDEV" != "" ] && Die "Sorry, you can't use --cd-recovery and --write-tapes at the same time" 2896 3064 MONDO_ROOT=`echo $CACHE_LOC | sed 's/\(.*\)\/.*/\1/'` … … 2916 3084 2917 3085 [ -e "$iso_cfg_file" ] || Die "Cannot find $iso_cfg_file" 2918 if [ ! "`DidMondoCallMe`" ]; then3086 if [ _"$MONDO_SHARE" = _"" ]; then 2919 3087 LogIt "Mindi Linux mini-distro generator v$MINDI_VERSION" 2920 3088 LogIt "Latest Mindi is available from http://www.mondorescue.org" 2921 3089 LogIt "BusyBox sources are available from http://www.busybox.net" 2922 LogIt "------------------------------------------------------------------------------"2923 3090 else 2924 3091 echo "You are using Mindi-Linux v$MINDI_VERSION to make boot+data disks" >> /var/log/mondo-archive.log … … 2955 3122 fi 2956 3123 3124 if [ _"$USBDEV" != _"" ]; then 3125 LogIt "Including the generation of a Bootable USB device on $USBDEV" 3126 fi 2957 3127 if [ "$kernelpath" = "" ] ; then 2958 [ "`DidMondoCallMe`" ] && Die "Please use -k <path> to specify kernel." 2959 echo -en "Do you want to use your own kernel to build the boot disk ([y]/n) ?" 2960 read ch 2961 if [ "$ch" != "n" ] && [ "$ch" != "N" ] ; then 2962 USE_OWN_KERNEL="yes" 3128 if [ _"$MONDO_SHARE" != _"" ]; then 3129 Die "Please use -k <path> to specify kernel." 3130 fi 3131 if [ $INTERACTIVE == "yes" ]; then 3132 echo -en "Do you want to use your own kernel to build the boot disk ([y]/n) ?" 3133 read ch 3134 if [ "$ch" != "n" ] && [ "$ch" != "N" ] ; then 3135 USE_OWN_KERNEL="yes" 3136 fi 2963 3137 fi 2964 3138 if [ "$USE_OWN_KERNEL" = "yes" ]; then … … 2973 3147 fi 2974 3148 fi 2975 if [ ! "`DidMondoCallMe`" ] ; then3149 if [ _"$MONDO_SHARE" = _"" ] && [ $INTERACTIVE = "yes" ] && [ "$ARCH" != "ia64" ] ; then 2976 3150 echo -en "Would you like to use LILO (instead of syslinux)\nfor your boot CD/floppies (y/[n]) ?" 2977 3151 read ch 2978 if [ "$ch" != "y" ] && [ "$ch" != "Y" ] ; then 2979 USE_LILO=no 2980 else 3152 if [ "$ch" = "y" ] || [ "$ch" = "Y" ] ; then 2981 3153 USE_LILO=yes 2982 3154 fi 2983 3155 fi 2984 3156 if [ "$YOUR_KERNEL_SUCKS" != "" ] || [ "$kernelpath" = "" ] || [ "$kernelpath" = "SUCKS" ] || [ "$kernelpath" = "FAILSAFE" ] ; then 2985 kernelpath=$MINDI_LIB/vmlinuz 2986 LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks." 2987 LogIt "However, you are still running your kernel. If Mindi fails to create your" 2988 LogIt "disks then it may still be a result of a problem with your kernel." 2989 pwd=`pwd` 2990 cd $MINDI_TMP 2991 bzip2 -dc $MINDI_LIB/lib.tar.bz2 | tar -x || Die "Cannot unzip lib.tar.bz2" 2992 cd $pwd 3157 # If we have a distribution-specific script for finding a FAILSAFE kernel, use it. 3158 if [ -f "$MINDI_LIB/FindDistroFailsafe" ] && [ ! "$1" = "--makemountlist" ]; then 3159 source $MINDI_LIB/FindDistroFailsafe 3160 # Log kernel image 3161 LogIt "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)" 3162 kernelpath="$FAILSAFE_KBIN" 3163 LogIt "I shall include a failsafe kernel, not your kernel, in the boot disks.\n" 3164 LogIt "The failsafe kernel is $kernelpath.\n" 3165 LogIt "However, you are still running your kernel. If Mindi fails to create your\n" 3166 LogIt "disks then it may still be a result of a problem with your kernel.\n" 3167 pwd=`pwd` 3168 cd $TMP_ROOT 3169 mkdir -p lib/modules 3170 cp -a "/lib/modules/$FAILSAFE_KVER" "lib/modules/$FAILSAFE_KVER" || Die "Cannot copy kernel modules." 3171 cd $pwd 3172 else 3173 kernelpath=$MINDI_LIB/vmlinuz 3174 LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks." 3175 LogIt "However, you are still running your kernel. If Mindi fails to create your" 3176 LogIt "disks then it may still be a result of a problem with your kernel." 3177 pwd=`pwd` 3178 cd $MINDI_TMP 3179 bzip2 -dc $MINDI_LIB/lib.tar.bz2 | tar -x || Die "Cannot unzip lib.tar.bz2" 3180 cd $pwd 3181 fi 2993 3182 YOUR_KERNEL_SUCKS="Your kernel sucks" 2994 3183 fi … … 3053 3242 ...Or type 'memtest' to test your PC's RAM thoroughly.\n" 3054 3243 3055 if [ ! "`DidMondoCallMe`" ]; then3244 if [ _"$MONDO_SHARE" = _"" ]; then 3056 3245 ListImagesForUser $CACHE_LOC 3057 3246 boot_dev=/dev/fd0u1722 … … 3063 3252 fi 3064 3253 OfferToMakeBootableISO $CACHE_LOC 3254 if [ _"$USBDEV" != _"" ] ; then 3255 OfferToMakeBootableUSB $CACHE_LOC 3256 fi 3065 3257 LogIt "Finished." 3066 3258 elif [ "$TAPEDEV" ] ; then … … 3072 3264 Die "Cannot find all.tar.gz, to be written to tape" 3073 3265 fi 3266 elif [ _"$USBDEV" != _"" ] ; then 3267 OfferToMakeBootableUSB $CACHE_LOC 3074 3268 else 3075 3269 OfferToMakeBootableISO $CACHE_LOC -
trunk/mindi/rootfs/etc/group
r30 r1079 6 6 tty::5: 7 7 disk::6:root,adm 8 lp::7:lp9 8 mem::8: 10 9 kmem::9: 11 10 wheel::10:root 12 11 floppy::11:root 13 mail::12:mail14 news::13:news15 uucp::14:uucp16 man::15:man17 users::100:games18 12 nogroup::65534: -
trunk/mindi/rootfs/etc/hosts
r30 r1079 1 2 1 127.0.0.1 localhost 3 127.0.0.1 darkstar.frop.org darkstar4 212.216.176.33 mail.tin.it -
trunk/mindi/rootfs/etc/ld.so.conf
r863 r1079 2 2 /usr/lib 3 3 /usr/local/lib 4 /usr/ns/lib5 /usr/vnc/lib6 /usr/tcltk/lib7 4 /usr/X11R6/lib 8 /usr/srv/lib9 /usr/wks/lib10 /usr/gcc/lib11 /usr/perl/lib12 /usr/emu/lib13 /usr/jvm/lib14 5 /lib64 15 6 /usr/lib64 -
trunk/mindi/rootfs/etc/passwd
r30 r1079 1 halt:x:7:0:halt:/sbin:/sbin/halt2 operator:x:11:0:operator:/root:/bin/bash3 1 root::0:0::/root:/bin/bash 4 shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown5 sync:x:5:0:sync:/sbin:/bin/sync6 2 bin:x:1:1:bin:/bin: 7 ftp:x:404:1::/home/ftp:/bin/bash8 3 daemon:x:2:2:daemon:/sbin: 9 4 adm:x:3:4:adm:/var/adm: 10 lp:x:4:7:lp:/var/spool/lpd:11 mail:x:8:12:mail:/var/spool/mail:12 postmaster:x:14:12:postmaster:/var/spool/mail:/bin/bash13 news:x:9:13:news:/usr/lib/news:14 uucp:x:10:14:uucp:/var/spool/uucppublic:15 man:x:13:15:man:/usr/man:16 guest:x:405:100:guest:/dev/null:/dev/null17 5 nobody:x:65534:100:nobody:/dev/null: 18 alfa::1001:0:alfa:/alfa: -
trunk/mindi/rootfs/etc/shells
r30 r1079 1 1 /bin/sh 2 -
trunk/mindi/rootfs/etc/termcap
r30 r1079 11 11 # Some entries in termcap 2.0.7 are too long and your programs 12 12 # may complain "tgetent: warning: termcap entry too long". Here is 13 a smaller termcap. But it may not cover as many terminals as the one13 # a smaller termcap. But it may not cover as many terminals as the one 14 14 # in termcap 2.0.7. You can install it as /etc/termcap. 15 15 # -
trunk/mindi/rootfs/sbin/init
r1046 r1079 272 272 if [ "`HowMuchFreeSpaceOnRamdisk`" -le "3" ] ; then 273 273 LogIt "Ramdisk is a bit smaller than I would like." 1 274 LogIt "Please re-run Mondo/Mindi but edit /usr/local/mindi first" 1274 LogIt "Please re-run Mondo/Mindi but edit mindi first" 1 275 275 LogIt "and set EXTRA_SPACE to something high, e.g. 8000" 1 276 276 Die "Aborting. Please reboot." … … 424 424 trap CaughtSoftReset SIGTERM 425 425 LOGFILE=/tmp/mondo-restore.log 426 PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/mondo:/usr/ local/mondo:/usr/local/mindi:.426 PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/mondo:/usr/games 427 427 GROOVY=/tmp/groovy-stuff 428 428 USER=root -
trunk/mondo-doc/mindi.8
r979 r1079 33 33 .BI "mindi --makemountlist "file 34 34 .br 35 .BI "mindi [--max-compressed-size "max "] --custom " parameters 35 .BI "mindi --usb "device 36 .br 37 .BI "mindi --printvar "variable 36 38 .SH DESCRIPTION 37 39 .PP … … 64 66 .SH OPTIONS 65 67 .TP 66 .B R"-v"| " --version"| " -V"| " -version"67 Prints the version of mindi.68 .TP 69 .B --findkernel70 Finds the image of the running kernel in the file system.68 .BI "-v"| " --version"| " -V"| " -version" 69 .RI Prints the version of mindi. 70 .TP 71 .BI "--findkernel" 72 .RI Finds the image of the running kernel in the file system. 71 73 .TP 72 74 .BI "--makemountlist "file 73 75 .RI "Creates a mount list and writes it to file "file ". 74 76 .TP 75 .BI "--max-compressed-size "max 76 Maximum size for disk image in KB. 77 .BI "--usb "device 78 .RI Create a bootable USB device 79 .TP 80 .BI "--printvar "variable 81 .RI "prints the value of the variable (useful for mondo-archive and debug)" 77 82 .TP 78 83 .BI "--custom " parameters 79 Provide all required parameters to 80 .B mindi 81 for non-interactive calling. This usually means a call from 84 .RI "Provide all required parameters to" 85 .B mindi 86 .RI "for non-interactive calling. This usually means a call from" 82 87 .BR "mondoarchive(8)". 83 88 The following parameters are used: … … 120 125 .br 121 126 19) make non-bootable [yes|no] 127 .br 128 20) use gzip [yes|no] 122 129 .br 123 130 (Blank parameters must be specified as "" on the command line.) … … 135 142 reports. 136 143 .TP 144 .I /etc/mindi/deplist.d 145 Files containing the list of files to be included on boot/root disks. 146 .TP 137 147 .I /etc/mindi/deplist.txt 138 List of files to be included on boot/root disks.148 List of additional files to be included on boot/root disks. 139 149 .TP 140 150 .I /var/cache/mindi/N.tar.gz … … 168 178 called 169 179 .B mindi.conf 170 which overwrites default values by setting up the following variables: 171 .TP 172 .I TMPDIR 173 .B (default /tmp): directory to create temporary files 174 .br 175 .TP 176 .I EXTRA_SPACE 177 .B (default 24576): increase if you run out of ramdisk space 178 .br 179 .TP 180 .I IA64_BOOT_SIZE 181 .B (default 8192): size of the ia64 boot disk 182 .br 183 .TP 184 .I CACHE_LOC 185 .B (default /var/cache/mindi): directory where boot/root files 186 and iso are generated 187 .br 188 WARNING: This directory is erased before usage 180 which overwrites default values described in 181 .B mindi.conf.dist 182 in the same directory. 189 183 .br 190 184 .SH "SEE ALSO" -
trunk/mondo-doc/mondoarchive.8
r1043 r1079 135 135 .B For experienced users only. 136 136 137 .TP 138 .BI "-U " 139 Use a generic USB device as backup device. Use this if you want to write 140 your backup to a USB key or USB disk, which will be make bootable. 141 The USB device should be attached to the system ir order for this to work. 142 .B WARNING: All the data on the related devices will be removed. 143 137 144 .SH MAJOR OPTIONS 138 145 .TP 13 … … 170 177 .TP 171 178 .BI "-d " "dev|dir" 172 Specify the backup device (CD/tape ) or directory (NFS/ISO). For CD-R[W] drives,179 Specify the backup device (CD/tape/USB) or directory (NFS/ISO). For CD-R[W] drives, 173 180 this is the SCSI node where the drive may be found, e.g. '0,1,0'. For tape 174 users, this is the tape streamers /dev entry, e.g. '/dev/st0'. For ISO users, 181 users, this is the tape streamers /dev entry, e.g. '/dev/st0'. For USB users, 182 this is the device name of your key or external disk. For ISO users, 175 183 this is the directory where the ISO images are stored. For NFS users, this is 176 184 the directory within the NFS mount where the backups are stored. The default … … 240 248 .BI "-F " 241 249 Do not offer to write boot+data floppy disk images to 3.5-inch floppy disks. 242 The images will remain in / root/images/mindi until your next backup run,250 The images will remain in /var/cache/mindi until your next backup run, 243 251 however. 244 252 … … 412 420 .I "mondoarchive -Ow 4 -I \*(lq/home /etc\*(rq" 413 421 422 .BI USB: 423 Backup to your USB key, using gzip compression: 424 .br 425 .I "mondoarchive -OU -d /dev/sda -G" 426 414 427 .BI NFS: 415 428 Backup to an NFS mount: -
trunk/mondo/INSTALL
r129 r1079 13 13 configure --with-maximum-noof-media=<big-number>. To make a statically 14 14 linked mondorestore (not tested), configure --enable-static-mr. 15 16 15 17 16 [original entry] -
trunk/mondo/Makefile.am
r824 r1079 2 2 SUBDIRS = src po 3 3 man8_MANS = docs/man/mondoarchive.8 docs/man/mondorestore.8 4 5 4 ACLOCAL_AMFLAGS = -I m4 6 7 EXTRA_DIST = config.rpath mkinstalldirs8 9 -
trunk/mondo/bootstrap
r507 r1079 1 1 #!/bin/bash 2 # 3 # $Id$ 2 4 # 3 5 # Built from scratch -
trunk/mondo/configure.in
r932 r1079 74 74 AC_CHECK_LIB(pthread, pthread_create, true, [echo "*** Cannot find -lpthread."; echo "*** Please make sure you have the linuxthreads glibc add-on installed."; exit 1]) 75 75 PTHREAD="-lpthread" 76 CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ REENTRANT"76 CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -Wshadow -funsigned-char -Wstrict-prototypes -Wunused -Winit-self -Wcast-align" 77 77 ;; 78 78 *) -
trunk/mondo/distributions/rpm/mondo.spec
r1043 r1079 16 16 Source: SSS 17 17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) 18 BuildRequires: newt-devel >= 0.50 18 BuildRequires: newt-devel >= 0.50, gettext-devel 19 19 ExcludeArch: ppc 20 20 OBS 21 Requires: mindi >= 1.2.1, bzip2 >= 0.9, afio, mkisofs, binutils, newt >= 0.50, DDD21 Requires: mindi >= 1.2.1, bzip2 >= 0.9, afio, mkisofs, binutils, newt >= 0.50, gettext, DDD 22 22 %ifarch ia64 23 23 Requires: elilo, parted -
trunk/mondo/po/POTFILES.in
r975 r1079 39 39 src/common/newt-specific.h 40 40 src/common/libmondo-tools.h 41 src/common/libmondo-string.c42 41 src/common/libmondo-fork.h 43 42 src/common/libmondo-files.h 44 43 src/common/libmondo-filelist.c 45 src/common/libmondo-string.h46 44 src/common/libmondo-raid.c 47 45 src/common/libmondo-filelist.h … … 49 47 src/common/libmondo-raid.h 50 48 src/common/mondostructures.h 51 src/common/libmondo-msg.c52 49 src/common/libmondo-archive.h 53 50 src/common/libmondo-stream.c -
trunk/mondo/src/common/Makefile.am
r839 r1079 1 ## 2 ## $Id$ 1 3 ## 2 4 ## Process this file with Automake to generate `Makefile.in' -
trunk/mondo/src/common/libmondo-archive.c
r1074 r1079 32 32 #include "libmondo-verify-EXT.h" 33 33 #include "libmondo-archive.h" 34 34 35 #define DVDRWFORMAT 1 35 36 … … 544 545 char *tmp = NULL; 545 546 char *tmp1 = NULL; 547 char *tmp2 = NULL; 546 548 char *command = NULL; 547 549 char *use_lzo_sz = NULL; … … 786 788 mr_asprintf(&value, "dvd"); 787 789 break; 790 case usb: 791 strcpy(value, "usb"); 792 break; 788 793 default: 789 794 fatal_error("Unknown backup_media_type"); … … 854 859 log_msg(1, "lines_in_filelist = %ld", lines_in_filelist); 855 860 861 if (bkpinfo->backup_media_type == usb) { 862 asprintf(&tmp2, "--usb %s", bkpinfo->media_device); 863 } else { 864 asprintf(&tmp2,""); 865 } 866 856 867 // Watch it! This next line adds a parameter... 857 868 if (bkpinfo->nonbootable_backup) { … … 862 873 863 874 mr_asprintf(&command, 864 /* "mindi --custom 2=%s 3=%s/images 4=\"%s\" 5=\"%s\" \ 865 6=\"%s\" 7=%ld 8=\"%s\" 9=\"%s\" 10=\"%s\" \ 866 11=\"%s\" 12=%s 13=%ld 14=\"%s\" 15=\"%s\" 16=\"%s\" 17=\"%s\" 18=%ld 19=%d",*/ 867 "mindi --custom %s %s/images '%s' '%s' \ 875 "mindi %s --custom '%s' '%s/images' '%s' '%s' \ 868 876 '%s' %ld '%s' '%s' '%s' \ 869 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s'", bkpinfo->tmpdir, // parameter #2 870 bkpinfo->scratchdir, // parameter #3 871 bkpinfo->kernel_path, // parameter #4 872 tape_device, // parameter #5 873 tape_size_sz, // parameter #6 874 lines_in_filelist, // parameter #7 (INT) 875 use_lzo_sz, // parameter #8 876 cd_recovery_sz, // parameter #9 877 bkpinfo->image_devs, // parameter #10 878 broken_bios_sz, // parameter #11 879 last_filelist_number, // parameter #12 (STRING) 880 estimated_total_noof_slices, // parameter #13 (INT) 881 devs_to_exclude, // parameter #14 882 use_comp_sz, // parameter #15 883 use_lilo_sz, // parameter #16 884 use_star_sz, // parameter #17 885 bkpinfo->internal_tape_block_size, // parameter #18 (LONG) 886 bkpinfo->differential, // parameter #19 (INT) 887 use_gzip_sz, // parameter #20 (STRING) 888 tmp); 877 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s'", 878 tmp2, 879 bkpinfo->tmpdir, // parameter #2 880 bkpinfo->scratchdir, // parameter #3 881 bkpinfo->kernel_path, // parameter #4 882 tape_device, // parameter #5 883 tape_size_sz, // parameter #6 884 lines_in_filelist, // parameter #7 (INT) 885 use_lzo_sz, // parameter #8 886 cd_recovery_sz, // parameter #9 887 bkpinfo->image_devs, // parameter #10 888 broken_bios_sz, // parameter #11 889 last_filelist_number, // parameter #12 (STRING) 890 estimated_total_noof_slices, // parameter #13 (INT) 891 devs_to_exclude, // parameter #14 892 use_comp_sz, // parameter #15 893 use_lilo_sz, // parameter #16 894 use_star_sz, // parameter #17 895 bkpinfo->internal_tape_block_size, // parameter #18 (LONG) 896 bkpinfo->differential, // parameter #19 (INT) 897 use_gzip_sz, // parameter #20 (STRING) 898 tmp); 889 899 mr_free(tmp); 890 900 mr_free(tape_size_sz); … … 899 909 mr_free(use_lilo_sz); 900 910 mr_free(use_gzip_sz); 911 mr_free(tmp2); 901 912 902 913 log_msg(2, command); -
trunk/mondo/src/common/libmondo-devices.c
r1000 r1079 1 /* 2 *$Id$3 * Subroutines for handling devices 4 */ 1 /* libmondo-devices.c Subroutines for handling devices 2 $Id$ 3 */ 4 5 5 /** 6 6 * @file … … 1469 1469 case cdrw: 1470 1470 case dvd: 1471 case usb: 1471 1472 if (archiving_to_media) { 1472 if ( bkpinfo->backup_media_type != dvd) {1473 if ((bkpinfo->backup_media_type != dvd) && (bkpinfo->backup_media_type != usb)) { 1473 1474 if (ask_me_yes_or_no 1474 1475 (_("Is your computer a laptop, or does the CD writer incorporate BurnProof technology?"))) … … 1490 1491 mr_asprintf(&sz_size, "%d", DEFAULT_DVD_DISK_SIZE); // 4.7 salesman's GB = 4.482 real GB = 4582 MB 1491 1492 log_msg(1, "Setting to DVD defaults"); 1493 } else if (bkpinfo->backup_media_type == usb) { 1494 strcpy(bkpinfo->media_device, VANILLA_USB_DEVICE); 1495 strcpy(sz_size, "512"); 1492 1496 } else { 1493 1497 mr_allocstr(bkpinfo->media_device,VANILLA_SCSI_CDROM ); … … 1496 1500 log_msg(1, "Setting to CD defaults"); 1497 1501 } 1498 if ( bkpinfo->backup_media_type != dvd) {1502 if ((bkpinfo->backup_media_type != dvd) && (bkpinfo->backup_media_type != usb)) { 1499 1503 if (!popup_and_get_string(_("Speed"), comment, tmp)) { 1500 1504 log_to_screen(_("User has chosen not to backup the PC")); -
trunk/mondo/src/common/libmondo-fifo.c
r956 r1079 1 1 /* $Id$ */ 2 3 2 /** 4 3 * @file -
trunk/mondo/src/common/libmondo-fork.c
r900 r1079 2 2 * $Id$ 3 3 */ 4 5 4 #include "my-stuff.h" 6 5 #include "mondostructures.h" -
trunk/mondo/src/common/libmondo-raid.c
r900 r1079 17 17 #include "libmondo-raid.h" 18 18 #include "mr_mem.h" 19 #include "mr_str.h" 19 20 20 21 #ifdef __FreeBSD__ -
trunk/mondo/src/common/libmondo-tools.c
r1046 r1079 181 181 182 182 /** 183 * Locate mondoarchive's home directory. Searches in /usr/ local/mondo, /usr/share/mondo,183 * Locate mondoarchive's home directory. Searches in /usr/share/mondo, 184 184 * /usr/local/share/mondo, /opt, or if all else fails, search /usr. 185 185 * -
trunk/mondo/src/common/libmondo-verify.c
r1074 r1079 1 1 /* $Id$ */ 2 3 2 /** 4 3 * @file -
trunk/mondo/src/common/mondostructures.h
r1043 r1079 167 167 nfs, ///< Back up to an NFS mount on the local subnet. 168 168 tape, ///< Back up to tapes. 169 usb, ///< Back up to USB devices. 169 170 udev ///< Back up to another unsupported device; just send a stream of bytes. 170 171 } t_bkptype; … … 312 313 * The device we're backing up to. 313 314 * If backup_media_type is @b cdr, @b cdrw, or @b cdstream, this should be the SCSI node (e.g. 0,1,0). 314 * If backup_media_type is @b dvd, @b tape, or @b udev, this should be a /dev entry.315 * If backup_media_type is @b dvd, @b tape, @b usb or @b udev, this should be a /dev entry. 315 316 * If backup_media_type is anything else, this should be blank. 316 317 */ -
trunk/mondo/src/include/mr_conf.h
-
Property svn:eol-style
set to
native
-
Property svn:eol-style
set to
-
trunk/mondo/src/include/mr_str.h
-
Property svn:eol-style
set to
native
-
Property svn:eol-style
set to
-
trunk/mondo/src/include/my-stuff.h
-
Property svn:eol-style
set to
native
r1074 r1079 126 126 #define ARBITRARY_MAXIMUM 2000 ///< The maximum number of items showing at once in the mountlist or filelist editor. 127 127 #define MAX_TAPECATALOG_ENTRIES 8192 ///< The maximum number of entries in the tape catalog. 128 #define MAX_STR_LEN 380 ///< The maximum length of almost all @p char buffers in Mondo. 128 #define MAX_STR_LEN 384 ///< The maximum length of almost all @p char buffers in Mondo. 129 /// Note: Make this divisible by eight to avoid aligment issues 130 /// on 64bit platforms like ia64. 129 131 #define MAXIMUM_RAID_DEVS 32 ///< The maximum number of RAID devices in the raidlist. 130 132 #define MAXIMUM_ADDITIONAL_RAID_VARS 32 ///< The maximum number of additional RAID variables per RAID device in the raidlist. -
Property svn:eol-style
set to
-
trunk/mondo/src/lib/mr_conf.c
-
Property svn:eol-style
set to
native
-
Property svn:eol-style
set to
-
trunk/mondo/src/lib/mr_str.c
-
Property svn:eol-style
set to
native
-
Property svn:eol-style
set to
-
trunk/mondo/src/mondoarchive/Makefile.am
r900 r1079 1 ## $Id$ 2 ## 1 3 ## $Id$ 2 4 ## -
trunk/mondo/src/mondoarchive/mondo-cli.c
r1043 r1079 216 216 i = flag_set['c'] + flag_set['i'] + flag_set['n'] + 217 217 flag_set['t'] + flag_set['u'] + flag_set['r'] + 218 flag_set['w'] + flag_set['C'] ;218 flag_set['w'] + flag_set['C'] + flag_set['U']; 219 219 if (i == 0) { 220 220 retval++; … … 404 404 } 405 405 406 if (flag_set['U']) // USB 407 { 408 if (! flag_set['d']) { 409 fatal_error 410 ("You need to specify a device file with -d for bootable USB device creation"); 411 } 412 if (!flag_set['s']) { 413 fatal_error("You did not specify a size (-s) for your USB device. Aborting"); 414 } 415 } 416 406 417 if (flag_set['r']) // DVD 407 418 { … … 453 464 } 454 465 } 455 } else { /* CD size */466 } else { /* CD|USB size */ 456 467 if (flag_set['s']) { 457 468 if (process_the_s_switch(bkpinfo, flag_val['s'])) { … … 505 516 if (flag_set['w']) { 506 517 bkpinfo->backup_media_type = cdrw; 518 } 519 if (flag_set['U']) { 520 bkpinfo->backup_media_type = usb; 507 521 } 508 522 if (flag_set['z']) { … … 641 655 } 642 656 643 if (flag_set['d']) { /* backup directory (if ISO/NFS ) */657 if (flag_set['d']) { /* backup directory (if ISO/NFS/USB) */ 644 658 if (flag_set['i']) { 645 659 mr_allocstr(bkpinfo->isodir,flag_val['d']); … … 653 667 mr_allocstr(bkpinfo->nfs_remote_dir,flag_val['d']); 654 668 } else { /* backup device (if tape/CD-R/CD-RW) */ 655 656 669 mr_allocstr(bkpinfo->media_device, flag_val['d']); 657 670 } … … 673 686 674 687 if (!flag_set['d'] 675 && (flag_set['c'] || flag_set['w'] || flag_set['C'] )) {688 && (flag_set['c'] || flag_set['w'] || flag_set['C'] || flag_set['U'])) { 676 689 if (g_kernel_version >= 2.6) { 677 690 if (popup_and_get_string … … 902 915 while ((opt = 903 916 getopt(argc, argv, 904 "0123456789A:B:C:DE:FGHI:J:K:LNOP:QRS:T: VWb:c:d:ef:gik:l:mn:op:rs:tuw:x:z"))917 "0123456789A:B:C:DE:FGHI:J:K:LNOP:QRS:T:UVWb:c:d:ef:gik:l:mn:op:rs:tuw:x:z")) 905 918 != -1) { 906 919 if (opt == '?') { -
trunk/mondo/src/mondorestore/Makefile.am
r900 r1079 1 ## $Id$ 2 ## 1 3 ## $Id$ 2 4 ## 3 5 ## Process with Automake to generate Makefile.in 4 6 ## 7 AM_CPPFLAGS = -DMONDO_CONF_DIR=\"$(sysconfdir)\" -I${top_builddir}/src/include 5 8 6 9 AM_CPPFLAGS = -DMONDO_CONF_DIR=\"$(sysconfdir)\" -I${top_builddir}/src/include -
trunk/mondo/src/mondorestore/mondo-restore.c
r1043 r1079 1 1 /*************************************************************************** 2 * $Id$ 3 */ 2 $Id$ 3 restores mondoarchive data 4 ***************************************************************************/ 4 5 5 6 /** … … 2156 2157 mr_free(tarball_fname); 2157 2158 mr_asprintf(&tarball_fname, MNT_CDROM "/archives/%ld.afio.lzo", 2159 current_tarball_number); 2160 } 2161 if (!does_file_exist(tarball_fname)) { 2162 mr_free(tarball_fname); 2163 mr_asprintf(&tarball_fname, MNT_CDROM "/archives/%ld.afio.gz", 2158 2164 current_tarball_number); 2159 2165 } -
trunk/mondo/src/mondorestore/mondo-rstr-tools.h
r914 r1079 9 9 void kill_petris(void); 10 10 int mount_cdrom(struct s_bkpinfo *bkpinfo); 11 int mount_device(char *, char *, char *, bool); 11 12 int mount_all_devices(struct mountlist_itself *, bool); 12 13 void protect_against_braindead_sysadmins(void); -
trunk/mondo/src/test/mktest
r900 r1079 6 6 # 7 7 8 gcc -O2 -I../common -I../lib test-conf.c ../lib/mr_conf.c ../common/libmondo-msg.c -o test-conf 9 gcc -O2 -I../common -I../lib test-string.c ../lib/mr_str.c -o test-string 8 lib="../lib/mr_conf.c ../lib/mr_msg.c ../lib/mr_err.c ../lib/mr_mem.c" 9 OPT="-Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -Wstrict-prototypes -Wshadow -funsigned-char -Wunused -Winit-self -Wcast-align -O2 -g -I../common -I../include" 10 10 11 for f in "test-conf"; do 11 echo "Generating test-msg" 12 gcc $OPT test-msg.c $lib -o test-msg 13 echo "Generating test-string" 14 gcc $OPT test-string.c ../lib/mr_str.c $lib -o test-string 15 echo "Generating test-conf" 16 gcc $OPT test-conf.c $lib -o test-conf 17 18 echo "Testing against previous run" 19 for f in test-conf test-string test-msg; do 12 20 chmod 755 $f 13 21 ./$f > /tmp/$f.res … … 16 24 echo "$f test KO !!" 17 25 fi 26 valgrind -q --error-exitcode=1 --leak-check=yes ./$f 2>&1 > /tmp/valgrind-$f.res 27 if [ $? -ne 0 ]; then 28 echo "valgrind $f test KO !!" 29 fi 18 30 done -
trunk/mondo/src/test/mondo.conf
r531 r1079 5 5 # Test conf file for mondo 6 6 testfalse = TRUE 7 # For msg tests 8 logfile = "/tmp/mondo-test.log" 9 loglevel = 3 -
trunk/mondo/src/test/test-conf.c
-
Property svn:eol-style
set to
native
r900 r1079 7 7 8 8 #include <stdio.h> 9 #include "my-stuff.h" 9 #include <stdlib.h> 10 10 11 #include "mr_conf.h" 11 12 #include "mr_mem.h" … … 14 15 int g_buffer_pid = 0; 15 16 16 main() {17 int main(void) { 17 18 int ret = 0; 18 19 int i = 0; -
Property svn:eol-style
set to
-
trunk/mondo/src/test/test-conf.res
r561 r1079 1 1 Integer : ***3*** 2 2 Float : ***32.670000*** 3 String : *** "The big string"***3 String : ***The big string*** -
trunk/mondo/src/test/test-string.c
-
Property svn:eol-style
set to
native
r900 r1079 6 6 */ 7 7 8 #define _GNU_SOURCE9 8 #include <string.h> 10 9 #include <stdlib.h> 11 10 #include <stdio.h> 12 11 13 #include "my-stuff.h"14 12 #include "mr_str.h" 15 13 #include "mr_mem.h" 16 14 17 main() {15 int main(void) { 18 16 const char delims[3] = ": \n"; 19 17 … … 31 29 } 32 30 mr_free(string); 31 33 32 exit(0); 34 33 } -
Property svn:eol-style
set to
-
trunk/mondo/src/test/test-string.res
r561 r1079 6 6 token=|hda1[0]|, lastpos=28 7 7 token=|hda12[3]|, lastpos=37 8 token=|hda6[2] ]|, lastpos=459 token=|hda5[1] ]|, lastpos=538 token=|hda6[2]|, lastpos=45 9 token=|hda5[1]|, lastpos=53 -
trunk/tools/build2pkg
r1043 r1079 56 56 pv=`basename $src .tar.gz` 57 57 PVER=`echo $pv | sed "s|^$p-||" | cut -d- -f1` 58 59 if [ _"$p" = _"mindi" ]; then 60 # Copy FindDistroFailsafe if it makes sense for that distro 61 tar xfz $src $p-${PVER}/distributions/${ddir}-$dver/FindDistroFailsafe 2> /dev/null 62 ln $p-${PVER}/distributions/${ddir}-$dver/FindDistroFailsafe $p-${PVER} 2> /dev/null 63 fi 58 64 59 65 if [ _"$dtype" = _"rpm" ]; then -
trunk/tools/distro-env
r1043 r1079 29 29 elif grep -q CentOS /etc/redhat-release ; then 30 30 export ddir="centos" 31 export dver=`awk '{print $3}' /etc/redhat-release `31 export dver=`awk '{print $3}' /etc/redhat-release | cut -d. -f1` 32 32 else 33 33 export ddir="redhat" -
trunk/tools/mval
-
Property svn:executable
set to
*
r729 r1079 1 valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes 1 valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes $* -
Property svn:executable
set to
-
trunk/tools/quality
r900 r1079 31 31 echo "monodrescue $s usage : " 32 32 tot=0 33 for i in `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn|/\*|monitas ' | xargs grep -r -c -w $s | egrep -v ":0$"`; do33 for i in `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn|/\*|monitas|mindi-busybox' | xargs grep -r -c -w $s | egrep -v ":0$"`; do 34 34 echo " === $i" 35 35 ((tot=$tot+`echo $i | cut -d: -f2`)) … … 40 40 echo " " 41 41 echo "Qualimetry: " 42 find . -name '*.c' -o -name '*.h' | egrep -v '\.svn ' | xargs grep -r asprintf | egrep -v '/\*' | egrep -v 'asprintf\(&' > /tmp/mondo.quality42 find . -name '*.c' -o -name '*.h' | egrep -v '\.svn|/\*|monitas|/\*|mindi-busybox' | xargs grep -r asprintf | egrep -v '/\*' | egrep -v 'asprintf\(&' > /tmp/mondo.quality 43 43 cat /tmp/mondo.quality 44 44 echo "monodrescue uses : `cat /tmp/mondo.quality | wc -l` asprintf without &" 45 find . -name '*.c' -o -name '*.h' | egrep -v '\.svn ' | xargs grep -r getline | egrep -v '/\*' | egrep -v 'getline\(&' > /tmp/mondo.quality45 find . -name '*.c' -o -name '*.h' | egrep -v '\.svn|/\*|monitas|/\*|mindi-busybox' | xargs grep -r getline | egrep -v '/\*' | egrep -v 'getline\(&' > /tmp/mondo.quality 46 46 cat /tmp/mondo.quality 47 47 echo "monodrescue uses : `cat /tmp/mondo.quality | wc -l` getline without &" -
trunk/tools/svn2build
r1043 r1079 80 80 exit -1 81 81 fi 82 echo "Using $inc customization to build SPEC file"83 82 84 83 $TOOLHOME/mkchangelog.pl $dtype $p $MONDOTMP/$p.spec -
trunk/website/docs.shtml
r729 r1079 13 13 <h2>Mondo Rescue HOWTO</h2> 14 14 </div> 15 <p>The Mondo Rescue FAQ is available on our wiki:</p> 16 <ul> 17 <li>A <a href="http://trac.mondorescue.org/wiki/FAQ" target="_blank">Mondo Rescue FAQ</a> page.</li> 18 </ul> 19 Consult it before asking questions on the mailing list. Please read as well the following docs. 15 20 <p>The Mondo Rescue HOWTO is available under various formats:</p> 16 21 <ul>
Note:
See TracChangeset
for help on using the changeset viewer.