- Timestamp:
- Jan 25, 2011, 10:34:40 AM (14 years ago)
- Location:
- branches/2.2.10
- Files:
-
- 23 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mindi/README.bkphw
r2091 r2696 23 23 cp -a utilities/conrep /usr/local/bin 24 24 cp -a utilities/conrep.xml /usr/local/bin 25 # For versions <= 1.90 25 26 cp -a utilities/cpqacuxe/cpqacuxe /usr/local/bin 26 27 cp -a utilities/cpqacuxe/bld /usr/local/bin 27 28 mv /usr/local/bin/bld/*.so /usr/local/lib 29 # For recent versions 30 cp -a utilities/hpacucli /usr/local/bin 28 31 echo /usr/local/lib >> /etc/ld.so.conf 29 32 ldconfig -
branches/2.2.10/mindi/analyze-my-lvm
r2635 r2696 69 69 # Do not process LV whose VG are excluded 70 70 if [ -f $MINDI_TMP/excludedvgs ]; then 71 if [ "`grep $volume_group $MINDI_TMP/excludedvgs`" != "" ]; then71 if [ "`grep -x $volume_group $MINDI_TMP/excludedvgs`" != "" ]; then 72 72 echo "Not including LV $logical_volume as VG $volume_group was excluded" 73 73 return -
branches/2.2.10/mindi/deplist.d/proliant.conf
r2409 r2696 8 8 /usr/local/bin/cpqacuxe 9 9 /usr/local/bin/hponcfg 10 /usr/local/bin/hpacucli -
branches/2.2.10/mindi/mindi
r2651 r2696 57 57 MY_FSTAB=/etc/fstab 58 58 TAPE_MODS="ht st osst ide-tape ide_tape" 59 SCSI_MODS="3w-xxxx 3w_xxxx 3w_9xxx 3w-9xxx 53c7,8xx a100u2w a320raid aacraid adpahci 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 iscsi_tcp libiscsi scsi_transport_iscsi libiscsi_tcp isp megaraid megaraid_mm megaraid_mbox megaraid_sas m ptbase mptscsih mptsas mptspi mptfc mptscsi mptctl NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qla2200 qla2300 qla2400 qla2xxx qla2xxx_conf qlogicfas qlogicfc qlogicisp qlogicfas qlogicfas408 raw1394 scsi_mod scsi_transport_sas scsi_transport_spi scsi_transport_fc sd_mod crc_t10dif crc-t10dif seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs intermodule scsi_dh scsi_tgt emcpdm emcpgpx emcpmpx emcp dc395x diskdumplib scsi_dump_register"59 SCSI_MODS="3w-xxxx 3w_xxxx 3w_9xxx 3w-9xxx 53c7,8xx a100u2w a320raid aacraid adpahci 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 iscsi_tcp libiscsi scsi_transport_iscsi libiscsi_tcp isp megaraid megaraid_mm megaraid_mbox megaraid_sas mega_sr mptbase mptscsih mptsas mptspi mptfc mptscsi mptctl NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qla2200 qla2300 qla2400 qla2xxx qla2xxx_conf qlogicfas qlogicfc qlogicisp qlogicfas qlogicfas408 raw1394 scsi_mod scsi_transport_sas scsi_transport_spi scsi_transport_fc sd_mod crc_t10dif crc-t10dif seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs intermodule scsi_dh scsi_tgt emcpdm emcpgpx emcpmpx emcp dc395x diskdumplib scsi_dump_register" 60 60 61 61 # ide-probe-mod 62 IDE_MODS="ide ide-floppy floppy ide-generic ide-detect ide-mod ide-disk ide_disk ide-cd ide_cd ide_cd_mod ide-cd_mod ide-cs ide-core ide_core ide-gd_mod edd paride ata_generic ata_piix libata dock via82cxxx generic nvidia ahci sata_nv cmd64x pata_amd pata_marvell pata_serverworks pata_sis amd74xx sis5513 jmicron sata_promise sata_via serverworks sata_svw blkbk"62 IDE_MODS="ide ide-floppy floppy ide-generic ide-detect ide-mod ide-disk ide_disk ide-cd ide_cd ide_cd_mod ide-cd_mod ide-cs ide-core ide_core ide-gd_mod ide_gd_mod edd paride ata_generic ide_pci_generic ata_piix libata dock via82cxxx generic nvidia ahci sata_nv cmd64x pata_amd pata_marvell pata_serverworks pata_sis pata_sil680 pata_jmicron amd74xx sis5513 jmicron sata_promise sata_via serverworks sata_svw blkbk virtio" 63 63 PCMCIA_MODS="pcmcia_core ds yenta_socket" 64 USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage input hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd usbkbd usbhid keybdev mousedev libusual scsi_mod ff-memless ums_cypress ums-cypress"65 NET_MODS="auth_rpcgss sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 bnx2x e1000 e1000e igb eepro100 ne2k-pci tg3 libphy pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmxnet3 vmnet exportfs fuse libcrc32c crc32c netbk xenblktap"64 USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage input hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd xhci usbkbd usbhid keybdev mousedev libusual scsi_mod ff-memless ums_cypress ums-cypress cp210x" 65 NET_MODS="auth_rpcgss sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 bnx2x e1000 e1000e igb dca eepro100 ne2k-pci tg3 libphy pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmxnet3 vmnet exportfs fuse libcrc32c crc32c netbk xenblktap r8169" 66 66 CDROM_MODS="$TAPE_MODS $IDE_MODS $USB_MODS $PCMCIA_MODS $SCSI_MODS $NET_MODS af_packet cdrom isocd isofs inflate_fs nls_iso8859-1 nls_base nls_cp437 nls_utf8 sg sr_mod zlib_inflate iso9660" 67 67 # Those modules will only go on the backup media, not the boot media. 68 EXTRA_MODS="$CDROM_MODS vfat fat loop md-mod linear raid0 raid1 xor raid10 raid5 raid456 lvm-mod dm-mod dm_mod dm-snapshot dm_snapshot dm-zero dm_zero dm-mirror dm_mirror dm-multipath dm-round-robin dm-emc dm-hp-sw dm-rdac multipath jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd mbcache ext4 jbd2 crc16 ocfs2 ocfs2_dlm ocfs2_nodemanager configfs"68 EXTRA_MODS="$CDROM_MODS vfat fat loop md-mod linear raid0 raid1 xor raid10 raid5 raid456 raid6_pq xor async_tx async_memcpy async_xor lvm-mod dm-mod dm_mod dm-snapshot dm_snapshot dm-zero dm_zero dm-mirror dm_mirror dm-multipath dm-round-robin dm-emc dm-hp-sw dm-rdac multipath jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd mbcache ext4 jbd2 crc16 ocfs2 ocfs2_dlm ocfs2_nodemanager configfs" 69 69 # Replace with that line for HP OCMP e.g. 70 70 #DENY_MODS="MPS_Driver_Mapper mps octtldrv tscttl streams kqemu fdomain" … … 110 110 fi 111 111 112 # Last function called before exiting 113 # Parameter is exit code value 114 # Should be declared here as used immediately below potentialy 115 MindiExit() { 116 LogFile "Mindi $MINDI_VERSION is exiting" 117 LogFile "End date : `date`" 118 if [ _"$MONDO_SHARE" != _"" ] ; then 119 echo "------------- mindi logfile included -------------------------" >> /var/log/mondoarchive.log 120 cat $LOGFILE >> /var/log/mondoarchive.log 121 echo "--------------------------------------------------------------">> /var/log/mondoarchive.log 122 fi 123 124 cd / 125 sync& 126 127 # Clean temporary files only when standalone mindi 128 if [ _"$MINDI_TMP" != _"$MONDO_TMP" ]; then 129 rm -Rf $MINDI_TMP 130 fi 131 exit $1 132 } 133 134 LogIt() { 135 if [ -e /dev/stderr ] ; then 136 echo -e "$1" >> /dev/stderr 137 elif [ -e /usr/bin/logger ] ; then 138 /usr/bin/logger -s $1 139 fi 140 echo -e "$1" >> $LOGFILE 141 if [ _"$2" != _"" ]; then 142 grep -Ev "tar: Removing \`/\'" "$2" >> $LOGFILE 143 fi 144 rm -f "$2" 145 } 146 147 148 Die() { 149 local i 150 if [ "$1" = "" ] ; then 151 LogAll "FATAL ERROR" 152 else 153 LogAll "FATAL ERROR. $1" 154 fi 155 if [ _"$2" != _"" ]; then 156 grep -Ev "tar: Removing \`/\'" "$2" >> $LOGFILE 157 fi 158 rm -f "$2" 159 160 LogAll "Please e-mail a copy of $LOGFILE to the mailing list." 161 LogAll "See http://www.mondorescue.org for more information." 162 LogAll "WE CANNOT HELP unless you enclose that file.\n" 163 MindiExit -1 164 } 165 112 166 # Now we can create what we need 113 167 MINDI_TMP=`mktemp -d $TMPDIR/mindi.XXXXXXXXXX` … … 236 290 } 237 291 238 239 # Last function called before exiting240 # Parameter is exit code value241 MindiExit() {242 LogFile "Mindi $MINDI_VERSION is exiting"243 LogFile "End date : `date`"244 if [ _"$MONDO_SHARE" != _"" ] ; then245 echo "------------- mindi logfile included -------------------------" >> /var/log/mondoarchive.log246 cat $LOGFILE >> /var/log/mondoarchive.log247 echo "--------------------------------------------------------------">> /var/log/mondoarchive.log248 fi249 250 cd /251 sync&252 253 # Clean temporary files only when standalone mindi254 if [ _"$MINDI_TMP" != _"$MONDO_TMP" ]; then255 rm -Rf $MINDI_TMP256 fi257 exit $1258 }259 260 Die() {261 local i262 if [ "$1" = "" ] ; then263 LogAll "FATAL ERROR"264 else265 LogAll "FATAL ERROR. $1"266 fi267 if [ _"$2" != _"" ]; then268 grep -Ev "tar: Removing \`/\'" "$2" >> $LOGFILE269 fi270 rm -f "$2"271 272 LogAll "Please e-mail a copy of $LOGFILE to the mailing list."273 LogAll "See http://www.mondorescue.org for more information."274 LogAll "WE CANNOT HELP unless you enclose that file.\n"275 MindiExit -1276 }277 292 278 293 … … 890 905 } 891 906 892 893 907 # Called by TurnTgzIntoRdz, to make mondorestore.cfg 894 908 MakeMondoConfigFile() { … … 1370 1384 done 1371 1385 MakeMessageFile > $MINDI_TMP/iso/message.txt 1372 cp $kernelpath $MINDI_TMP/iso/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mindi tmp ($MINDI_TMP/iso/vmlinuz). Did you run out of disk space?"1373 1386 if [ $KERNEL_IS_XEN = "yes" ]; then 1374 1387 cp $xenkernelpath $MINDI_TMP/iso/xen.gz 2>> $LOGFILE || Die "Cannot copy xen.gz ($xenkernelpath) to mindi tmp ($MINDI_TMP/iso/xen.gz). Did you run out of disk space?" 1375 1388 cp $MBOOTC32 $MINDI_TMP/iso/mboot.c32 2>> $LOGFILE || Die "Cannot copy mboot.c32 ($MBOOTC32) to mindi tmp ($MINDI_TMP/iso/mboot.c32). Did you run out of disk space?" 1376 1389 fi 1377 1390 cp $kernelpath $MINDI_TMP/iso/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mindi tmp ($MINDI_TMP/iso/vmlinuz). Did you run out of disk space?" 1378 1391 cp $MINDI_TMP/initrd.img $MINDI_TMP/iso/initrd.img 2>> $LOGFILE || Die "Cannot copy initrd.img ($MINDI_TMP/initrd.img) to $MINDI_TMP/iso/initrd.img. Did you run out of disk space?" 1392 1379 1393 if [ _"$MONDO_SHARE" != _"" ]; then 1394 if [ $KERNEL_IS_XEN = "yes" ]; then 1395 cp $xenkernelpath $MONDO_CACHE/xen.gz 2>> $LOGFILE || Die "Cannot copy xen.gz ($xenkernelpath) to mindi tmp ($MINDI_TMP/iso/xen.gz). Did you run out of disk space?" 1396 cp $MBOOTC32 $MONDO_CACHE/mboot.c32 2>> $LOGFILE || Die "Cannot copy mboot.c32 ($MBOOTC32) to mindi tmp ($MINDI_TMP/iso/mboot.c32). Did you run out of disk space?" 1397 fi 1380 1398 cp $kernelpath $MONDO_CACHE/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_CACHE/vmlinuz). Did you run out of disk space?" 1381 1399 cp $MINDI_TMP/initrd.img $MONDO_CACHE/initrd.img 2>> $LOGFILE || Die "Cannot copy initrd.img ($MINDI_TMP/initrd.img) to $MONDO_CACHE/initrd.img. Did you run out of disk space?" … … 1395 1413 if [ "$ARCH" != "ia64" ] ; then 1396 1414 if [ _"$MONDO_SHARE" != _"" ]; then 1397 if [ $KERNEL_IS_XEN = "no" ]; then 1398 cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_CACHE 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_CACHE). Did you run out of disk space?" 1399 else 1400 cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt,mboot.c32,xen.gz} $MONDO_CACHE 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_CACHE). Did you run out of disk space?" 1415 cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,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?" 1416 if [ $KERNEL_IS_XEN = "yes" ]; then 1417 cp -f $MINDI_TMP/iso/{mboot.c32,xen.gz} $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy Xen core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?" 1401 1418 fi 1402 1419 cp -f $MONDO_SHARE/autorun $MINDI_TMP/iso 2>> $LOGFILE … … 1685 1702 retval=0 1686 1703 1687 [ ! -e "$kernelpath" ] && Die "PBDI - cannot find $kernelpath kernel"1704 [ ! -e "$kernelpath" ] && Die "PBDI lilo - cannot find $kernelpath kernel" 1688 1705 echo -en "Making "$BOOT_SIZE"KB boot disk..." 1689 1706 TurnTgzIntoRdz $MINDI_DATA/rootfs $MINDI_TMP/initrd.img `du -sk $kernelpath | cut -f1` || Die "Could not turn rootfs into initrd.img; are you SURE your kernel supports loopfs?" … … 1749 1766 1750 1767 retval=0 1751 if [ $KERNEL_IS_XEN = "no" ]; then 1752 cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null 1753 retval=$? 1754 else 1768 cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null 1769 retval=$? 1770 if [ $KERNEL_IS_XEN = "yes" ]; then 1755 1771 cp -f $xenkernelpath $mountpoint/xenkernel &> /dev/null 1756 retval=$?1757 cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null1758 1772 let retval+=$? 1759 1773 fi … … 1763 1777 du -sk $mountpoint/* >> $LOGFILE 1764 1778 LogFile "--- end of list of files ---" 1765 echo -en "Kernel size = `du -sk $kernelpath | cut -f1` K\nRamdisk free = $free_space K\n\ 1766 Sorry, your kernel is too big for your image.\n" >> $LOGFILE 1779 echo -en "Kernel size = `du -sk $kernelpath | cut -f1` K\nRamdisk free = $free_space K\n" >> $LOGFILE 1767 1780 [ "$mountpoint" != "" ] && rm -f $mountpoint/vmlinuz 1768 1781 cd $old_pwd … … 2056 2069 root="/" 2057 2070 fi 2058 for fname in `find $root -maxdepth 2 -type f | grep -E 'lin|kern' | grep -Ev '^/proc/|^/net/'` ; do 2071 # See if we're booted from a Xen kernel 2072 if [ -d /proc/sys/xen ]; then 2073 # It's a Xen kernel 2074 KERNEL_IS_XEN="yes" 2075 LogIt "It's a Xen kernel..." 2076 fi 2077 2078 for fname in `find $root -maxdepth 2 -type f | grep -Ei 'lin|kern|xen' | grep -Ev '^/proc/|^/net/'` ; do 2059 2079 [ ! -e "$fname" ] && continue 2060 2080 [ "$fname" = "/boot/vmlinuz.shipped" ] && [ -f "/boot/vmlinuz" ] && continue; # ignore SuSE's extra kernel … … 2098 2118 fi 2099 2119 fi 2100 possible_kernels=`echo "$possible_kernels" | tr -s ' ' '\n' | sort -u | tr '\n' ' '`2120 possible_kernels=`echo "$possible_kernels" | tr -s ' ' '\n' | grep -vi "xen" | sort -u | tr '\n' ' '` 2101 2121 noof_kernels=`CountItemsIn "$possible_kernels"` 2122 if [ $KERNEL_IS_XEN = "yes" ]; then 2123 possible_xenkernels=`echo "$possible_kernels" | tr -s ' ' '\n' | grep -i "xen" | sort -u | tr '\n' ' '` 2124 noof_xenkernels=`CountItemsIn "$possible_xenkernels"` 2125 FindMboot32Binary 2126 fi 2102 2127 if [ "$noof_kernels" -eq "0" ] ; then 2103 2128 LogAll "Could not find your kernel." … … 2118 2143 LogAll "$i is probably your kernel. " 2119 2144 output="$i" 2120 return2121 2145 fi 2122 2146 done 2123 if echo " $possible_kernels " | grep -F "/boot/vmlinuz " &> /dev/null ; then 2124 output=/boot/vmlinuz 2125 LogFile "Schlomo, this one's for you." 2147 if [ -n "$output" ]; then 2148 if echo " $possible_kernels " | grep -F "/boot/vmlinuz " &> /dev/null ; then 2149 output=/boot/vmlinuz 2150 echo "Schlomo, this one's for you." >> $LOGFILE 2151 else 2152 LogIt "Two or more possible kernels found. You may specify any one of them and the " 2153 LogIt "boot disks will still work, probably. If one does not work, try another." 2154 LogIt "$possible_kernels" 2155 echo "" 2156 fi 2157 fi 2158 fi 2159 if [ $KERNEL_IS_XEN = "yes" ]; then 2160 if [ "$noof_xenkernels" -eq "0" ]; then 2161 xenkernelpath="" 2162 elif [ "$noof_xenkernels" -eq "1" ]; then 2163 xenkernelpath=`echo "$possible_xenkernels" | sed s/' '//` 2164 echo "Your Xen kernel is $xenkernelpath (v$KERVERRUN)" >> $LOGFILE 2126 2165 else 2127 LogAll "Two or more possible kernels found. You may specify any one of them and the " 2128 LogAll "boot disks will still work, probably. If one does not work, try another." 2129 LogAll "$possible_kernels" 2130 echo "" 2131 fi 2132 fi 2133 echo "$output" | tr -s ' ' '\n' | sort -u | tr '\n' ' ' 2166 for i in $possible_xenkernels ; do 2167 if echo $i | grep "$KERVERRUN" ; then 2168 LogIt "OK, I used my initiative and found that " 2169 LogIt "$i is probably your Xen kernel. " 2170 xenkernelpath="$i" 2171 fi 2172 done 2173 if [ -n "$xenkernelpath" ]; then 2174 new_possible_xenkernels=`echo "$possible_xenkernels" | tr -s ' ' '\n' | grep -E "^/boot" | sort -u | tr '\n' ' '` 2175 if [ ! -n "$new_possible_xenkernels" ]; then 2176 xenkernelpath=`echo $new_possible_xenkernels | tr -s ' ' '\n' | head -1` 2177 LogIt "Using $xenkernelpath" 2178 else 2179 LogIt "Two or more possible Xen kernels found. You may specify any one of them and the " 2180 LogIt "boot disks will still work, probably. If one does not work, try another." 2181 LogIt "$possible_xenkernels" 2182 echo "" 2183 xenkernelpath=`echo $possible_xenkernels | tr -s ' ' '\n' | head -1` 2184 LogIt "Using $xenkernelpath" 2185 fi 2186 fi 2187 fi 2188 xenkernelname=`basename $xenkernelpath` 2189 if [[ -z "$xenkernelpath" || ! -f "$xenkernelpath" ]]; then 2190 Die "Cannot find Xen kernel $xenkernelpath, aborting" 2191 fi 2192 fi 2193 echo "$output" 2134 2194 } 2135 2195 … … 2277 2337 cat $MINDI_CACHE/mountlist.txt >> $LOGFILE 2278 2338 LogFile "-----------------------------------" 2339 2340 # Copy FW in case some drivers needs it 2341 if [ -d "/lib/firmware" ]; then 2342 cp -rp /lib/firmware $mountpoint/lib 2343 fi 2279 2344 2280 2345 cd $old_pwd … … 2663 2728 2664 2729 kernelpath=$4; [ "$kernelpath" = "(null)" ] && kernelpath="" 2665 # See if it's a Xen kernel 2666 if [ -n "$kernelpath" ]; then 2667 strings $kernelpath | grep -iq xen 2>/dev/null 2668 if [ $? -eq 0 ]; then 2669 # It's a Xen kernel 2670 KERNEL_IS_XEN=yes 2671 LogFile "It's a Xen kernel..." 2672 # WARNING: This will only work for RHEL 5 2673 # TODO: SLES and others 2674 # Use TryToFindKernelPath ? 2675 xenkernelpath="/boot/`uname -r | awk '{sub("[Xx][Ee][Nn]",""); printf("xen.gz-%s",$0)}'`" 2676 if [[ -z "$xenkernelpath" || ! -f "$xenkernelpath" ]]; then 2677 Die "Cannot find Xen kernel $xenkernelpath, aborting" 2678 fi 2679 xenkernelname=`basename $xenkernelpath` 2680 FindMboot32Binary 2681 fi 2682 fi 2683 2730 [ "$kernelpath" = "" ] && kernelpath=`TryToFindKernelPath` 2731 2684 2732 ### 2685 2733 ### Sq-Modification... … … 2691 2739 LogAll "xenkernelname = $xenkernelname" 2692 2740 fi 2693 kernelname=`echo $kernelpath | cut -d'-' -f2-` 2694 LogAll "kernelname = $kernelname" 2695 LogAll "kernelpath = $kernelpath" 2741 kernelname=`echo $kernelpath | cut -d'-' -f2- | sed 's/.[bg]z[2]*$//'` 2696 2742 if [ ! -d "/lib/modules/$kernelname" ] 2697 2743 then … … 2702 2748 LogAll "Using modules for kernel: ${kernelname}" 2703 2749 fi 2750 LogAll "kernelname = $kernelname" 2751 LogAll "kernelpath = $kernelpath" 2704 2752 ### 2705 2753 ### end of Sq-Modification … … 2733 2781 [ "$USE_LZMA" = "" ] && USE_LZMA=no 2734 2782 [ "$TAPEDEV" ] && LogAll "This is a tape-based backup. Fine." 2735 [ "$kernelpath" = "" ] && kernelpath=`TryToFindKernelPath`2736 kernelname=`echo $kernelpath | cut -d'-' -f2-`2737 if [ ! -d "/lib/modules/$kernelname" ]2738 then2739 LogAll "Module path for ${kernelpath} not found..."2740 LogAll "using running kernel\'s modules."2741 kernelname=$KERVERRUN2742 else2743 LogAll "Using modules for kernel: ${kernelname}"2744 fi2745 2783 2746 2784 MONDO_CACHE=/var/cache/mondo -
branches/2.2.10/mindi/mindi-bkphw
r2462 r2696 73 73 print TOOLS "$tooldir/bld\n"; 74 74 } 75 if ($tool =~ /\/.hpacucli$/) { 76 my $dir=basename($tool); 77 $ret = system("export ACUXE_BIN_INSTALLATION_DIR=$dir ; export IM_CFGFILE_PATH=$dir ; export ACUXE_LOCK_FILES_DIR=$dir/locks ; $tool -c $bkpdir/hpacucli.dat"); 78 print SCRIPT "export ACUXE_BIN_INSTALLATION_DIR=$dir ; export IM_CFGFILE_PATH=$dir ; export ACUXE_LOCK_FILES_DIR=$dir/locks ; $tool -i $locbkpdir/hpacucli.dat\n"; 79 print TOOLS "$tooldir/bld\n"; 80 } 75 81 if ($tool =~ /\/hponcfg$/) { 76 82 $ret = system("$tool -w $bkpdir/hponcfg.dat"); -
branches/2.2.10/mindi/proliant.files
r1832 r2696 1 1 /usr/local/bin/hponcfg 2 2 /usr/local/bin/conrep 3 /usr/local/bin/hpacucli 3 4 /opt/compaq/cpqacuxe/bld/.acuxebin 4 5 /usr/local/bin/bld/.acuxebin -
branches/2.2.10/mindi/rootfs/sbin/init
r2623 r2696 284 284 fi 285 285 # Depending on udevd version it gives back the hand or not :-( 286 ps | grep udevd 2> /dev/null 1> /dev/null286 ps | grep -v grep |grep udevd 2> /dev/null 1> /dev/null 287 287 if [ $? -ne 0 ]; then 288 288 /sbin/udevd --daemon & -
branches/2.2.10/mondo/README
r2635 r2696 65 65 66 66 This license was given to MondoRescue by the original author Hugo Rabson, and is 67 continue its current maintainer Bruno Cornec.67 continued by its current maintainer Bruno Cornec. 68 68 -
branches/2.2.10/mondo/src/common/libmondo-cli.c
r2508 r2696 497 497 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 498 498 mr_asprintf(tmp1, "sshfs %s", bkpinfo->netfs_mount); 499 } else if (strstr(bkpinfo->netfs_proto, "nfs")) { 500 mr_asprintf(tmp1, "mount %s", bkpinfo->netfs_mount); 499 501 } else { 500 mr_asprintf(tmp1, "mount %s", bkpinfo->netfs_mount); 502 log_to_screen("Protocol %s not supported yet for network backups.\n", bkpinfo->netfs_proto); 503 fatal_error("Bad Protocol\n"); 501 504 } 502 505 i = system(tmp1); -
branches/2.2.10/mondo/src/common/libmondo-devices.c
r2643 r2696 1271 1271 1272 1272 1273 /** 1274 * Mount the CD-ROM or USB device at /mnt/cdrom. 1275 * @param bkpinfo The backup information structure. Fields used: 1276 * - @c bkpinfo->backup_media_type 1277 * - @c bkpinfo->disaster_recovery 1278 * - @c bkpinfo->isodir 1279 * - @c bkpinfo->media_device 1280 * @return 0 for success, nonzero for failure. 1281 */ 1282 int mount_media() 1283 { 1284 char *mount_cmd = NULL; 1285 int i, res; 1286 #ifdef __FreeBSD__ 1287 char mdd[32]; 1288 char *mddev = mdd; 1289 #endif 1290 1291 if (bkpinfo->backup_media_type == tape || bkpinfo->backup_media_type == udev) { 1292 log_msg(8, "Tape/udev. Therefore, no need to mount a media."); 1293 return 0; 1294 } 1295 1296 if (!run_program_and_log_output("mount | grep -F " MNT_CDROM, FALSE)) { 1297 log_msg(2, "mount_media() - media already mounted. Fair enough."); 1298 return (0); 1299 } 1300 1301 if (bkpinfo->media_device == NULL) { 1302 fatal_error("No media device at that point"); 1303 } 1304 1305 if (bkpinfo->backup_media_type == netfs) { 1306 log_msg(2, "Mounting for Network thingy"); 1307 log_msg(2, "isodir = %s", bkpinfo->isodir); 1308 if (!strcmp(bkpinfo->isodir, "/") && am_I_in_disaster_recovery_mode()) { 1309 mr_free(bkpinfo->isodir); 1310 mr_asprintf(bkpinfo->isodir, "/tmp/isodir"); 1311 log_msg(1, "isodir is being set to %s", bkpinfo->isodir); 1312 } 1313 if ((bkpinfo->isodir == NULL) || (bkpinfo->netfs_remote_dir == NULL) || (bkpinfo->prefix == NULL)) { 1314 fatal_error("Unable to prepare the iso filename"); 1315 } 1316 #ifdef __FreeBSD__ 1317 mr_asprintf(mount_cmd, "/mnt/isodir/%s/%s/%s-%d.iso", bkpinfo->isodir, 1318 bkpinfo->netfs_remote_dir, bkpinfo->prefix, g_current_media_number); 1319 mddev = make_vn(mount_cmd); 1320 mr_free(mount_cmd); 1321 1322 mr_asprintf(mount_cmd, "mount_cd9660 -r %s " MNT_CDROM, mddev); 1323 #else 1324 mr_asprintf(mount_cmd, "mount %s/%s/%s-%d.iso -t iso9660 -o loop,ro %s", bkpinfo->isodir, bkpinfo->netfs_remote_dir, bkpinfo->prefix, g_current_media_number, MNT_CDROM); 1325 #endif 1326 1327 } else if (bkpinfo->backup_media_type == iso) { 1328 #ifdef __FreeBSD__ 1329 mr_sprintf(mount_cmd, "%s/%s-%d.iso", bkpinfo->isodir, 1330 bkpinfo->prefix, g_current_media_number); 1331 mddev = make_vn(mount_cmd); 1332 mr_free(mount_cmd); 1333 1334 mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", mddev, MNT_CDROM); 1335 #else 1336 mr_asprintf(mount_cmd, "mount %s/%s-%d.iso -t iso9660 -o loop,ro %s", bkpinfo->isodir, bkpinfo->prefix, g_current_media_number, MNT_CDROM); 1337 #endif 1338 } else if (bkpinfo->backup_media_type == usb) { 1339 mr_asprintf(mount_cmd, "mount -t vfat %s %s", bkpinfo->media_device, MNT_CDROM); 1340 } else if (strstr(bkpinfo->media_device, "/dev/")) { 1341 #ifdef __FreeBSD__ 1342 mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device, MNT_CDROM); 1343 #else 1344 mr_asprintf(mount_cmd, "mount %s -t iso9660 -o ro %s", bkpinfo->media_device, MNT_CDROM); 1345 #endif 1346 } else { 1347 mr_free(bkpinfo->media_device); 1348 if (bkpinfo->disaster_recovery && does_file_exist("/tmp/CDROM-LIVES-HERE")) { 1349 bkpinfo->media_device = last_line_of_file(MINDI_CACHE"/CDROM-LIVES-HERE"); 1350 } else { 1351 bkpinfo->media_device = find_cdrom_device(TRUE); 1352 } 1353 1354 #ifdef __FreeBSD__ 1355 mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device, MNT_CDROM); 1356 #else 1357 mr_asprintf(mount_cmd, "mount %s -t iso9660 -o ro %s", bkpinfo->media_device, MNT_CDROM); 1358 #endif 1359 } 1360 1361 log_msg(2, "(mount_media) --- command = %s", mount_cmd); 1362 for (i = 0; i < 2; i++) { 1363 res = run_program_and_log_output(mount_cmd, FALSE); 1364 if (!res) { 1365 break; 1366 } else { 1367 log_msg(2, "Failed to mount device."); 1368 sleep(5); 1369 sync(); 1370 } 1371 } 1372 mr_free(mount_cmd); 1373 1374 if (res) { 1375 log_msg(2, "Failed, despite %d attempts", i); 1376 } else { 1377 log_msg(2, "Mounted media drive OK"); 1378 } 1379 return (res); 1380 } 1381 /************************************************************************** 1382 *END_MOUNT_CDROM * 1383 **************************************************************************/ 1273 1384 1274 1385 … … 1316 1427 // BERLIOS --- I'm tempted to do something about this... 1317 1428 // Why unmount and remount again and again? 1318 log_msg(3, "Remounting CD");1319 1429 g_ISO_restore_mode = TRUE; 1320 if (is_this_device_mounted(MNT_CDROM)) { 1321 run_program_and_log_output("umount " MNT_CDROM, 5); 1322 } 1323 mr_asprintf(tmp, "mkdir -p %s/isodir &> /dev/null", bkpinfo->tmpdir); 1324 (void)system(tmp); 1325 mr_free(tmp); 1326 1327 if (((bkpinfo->isodir == NULL) && (bkpinfo->netfs_remote_dir == NULL)) || (bkpinfo->prefix == NULL)) { 1328 fatal_error("Unable to prepare ISO file name. Please report to dev team"); 1329 } 1330 if (bkpinfo->netfs_remote_dir) { 1331 // NETFS 1332 mr_asprintf(tmp, "%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->netfs_remote_dir, bkpinfo->prefix, cd_number_i_want); 1333 } else { 1334 // ISO 1335 mr_asprintf(tmp, "%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->prefix, cd_number_i_want); 1336 } 1337 if (!does_file_exist(tmp)) { 1338 mr_free(tmp); 1339 if (bkpinfo->netfs_remote_dir) { 1340 // NETFS 1341 mr_asprintf(tmp, "%s/isodir/%s/%s-%d.iso", bkpinfo->tmpdir, bkpinfo->netfs_remote_dir, bkpinfo->prefix, cd_number_i_want); 1342 } else { 1343 // ISO 1344 mr_asprintf(tmp, "%s/isodir/%s-%d.iso", bkpinfo->tmpdir, bkpinfo->prefix, cd_number_i_want); 1345 } 1346 if (does_file_exist(tmp)) { 1347 log_msg(1, "FIXME - hacking bkpinfo->isodir from '%s' to %s/isodir", bkpinfo->isodir, bkpinfo->tmpdir); 1348 mr_free(bkpinfo->isodir); 1349 mr_asprintf(bkpinfo->isodir, "%s/isodir", bkpinfo->tmpdir); 1350 } 1351 } 1352 log_msg(3, "Mounting %s at %s", tmp, MNT_CDROM); 1353 if (mount_CDROM_here(tmp, MNT_CDROM)) { 1354 mr_free(tmp); 1355 fatal_error("Mommy!"); 1356 } 1357 mr_free(tmp); 1430 if (!is_this_device_mounted(MNT_CDROM)) { 1431 log_msg(3, "Mounting media"); 1432 g_current_media_number = cd_number_i_want; 1433 mount_media(); 1434 } 1358 1435 } 1359 1436 if ((res = what_number_cd_is_this()) != cd_number_i_want) { … … 1947 2024 case -1: 1948 2025 /* we need to add a space after token to be sure our strstr test works correctly */ 1949 mr_asprintf(tmp1," %s ",token);2026 mr_asprintf(tmp1," %s ",token); 1950 2027 if (mode == 'E') { 1951 2028 /* Add the token if not already in the list */ 1952 mr_asprintf(tmp," %s ",bkpinfo->exclude_paths);2029 mr_asprintf(tmp," %s ",bkpinfo->exclude_paths); 1953 2030 if (strstr(tmp,tmp1) == NULL) { 1954 mr_strcat(bkpinfo->exclude_paths, " 2031 mr_strcat(bkpinfo->exclude_paths, "%s", tmp1); 1955 2032 } 1956 2033 } else { 1957 2034 /* Add the token if not already in the list */ 1958 mr_asprintf(tmp," %s ",bkpinfo->include_paths);2035 mr_asprintf(tmp," %s ",bkpinfo->include_paths); 1959 2036 if (strstr(tmp,tmp1) == NULL) { 1960 mr_strcat(bkpinfo->include_paths, " 2037 mr_strcat(bkpinfo->include_paths, "%s", tmp1); 1961 2038 } 1962 2039 } -
branches/2.2.10/mondo/src/common/libmondo-filelist.c
r2651 r2696 452 452 } 453 453 log_msg(8, "Analyzing %s", file_to_analyze); 454 tmp = mr_stresc(file_to_analyze, " `$\\\"(){}[]'*?&|!#~", '\\');454 tmp = mr_stresc(file_to_analyze, " `$\\\"(){}[]'*?&|!#~", '\\'); 455 455 mr_asprintf(strtmp, syscall_sprintf, tmp); 456 456 mr_free(tmp); … … 477 477 478 478 if (g_getfacl != NULL) { 479 mr_asprintf(command, "touch %s", facl_fname);479 mr_asprintf(command, "touch \"%s\"", facl_fname); 480 480 run_program_and_log_output(command, 8); 481 481 mr_free(command); 482 482 483 483 retval = 484 gen_aux_list(filelist, "getfacl --all-effective -P %s", facl_fname);484 gen_aux_list(filelist, "getfacl --all-effective -P \"%s\"", facl_fname); 485 485 } 486 486 return (retval); … … 494 494 495 495 if (g_getfattr != NULL) { 496 mr_asprintf(command, "touch %s", fattr_fname);496 mr_asprintf(command, "touch \"%s\"", fattr_fname); 497 497 run_program_and_log_output(command, 8); 498 498 mr_free(command); -
branches/2.2.10/mondo/src/common/libmondo-fork.c
r2607 r2696 369 369 370 370 if (!does_file_exist(lockfile)) { 371 log_to_screen("Waiting for external binary to start");371 log_to_screen("Waiting for '%s' to start",command); 372 372 for (i = 0; i < 60 && !does_file_exist(lockfile); sleep(1), i++) { 373 373 log_msg(3, "Waiting for lockfile %s to exist", lockfile); -
branches/2.2.10/mondo/src/common/libmondo-mountlist.c
r2517 r2696 331 331 /* OK, continue with main loop */ 332 332 amount_allocated += mountlist->el[pos].size / 1024L; 333 334 /* This should only happen at the end but not tested now */ 335 if (amount_allocated > physical_drive_size) { 336 // Used to be +1, but what if you're 1 MB too high? 337 mr_asprintf(tmp, " %ld MB over-allocated on %s.",amount_allocated - physical_drive_size, drive); 338 log_it(tmp); 339 340 /* Do we have more than 1 MB per partition ? */ 341 if (amount_allocated - physical_drive_size <= curr_part_no) { 342 /* Probably a rouding error, just passing over 343 * by reducing the last partition if possible */ 344 amount_allocated -= mountlist->el[pos].size / 1024L; 345 mountlist->el[pos].size = (mountlist->el[pos].size - curr_part_no*1024L); 346 amount_allocated += mountlist->el[pos].size / 1024L; 347 } else { 348 mr_strcat(flaws_str, "%s", tmp); 349 res++; 350 } 351 mr_free(tmp); 352 } 333 353 prev_part_no = curr_part_no; 334 354 } -
branches/2.2.10/mondo/src/common/libmondo-tools.c
r2635 r2696 376 376 } 377 377 378 log_msg(1, " Foo");378 log_msg(1, "Post-param"); 379 379 if (bkpinfo->backup_media_type == tape) { 380 log_msg(1, " Bar");380 log_msg(1, "Tape"); 381 381 if (bkpinfo->media_device == NULL) { 382 382 return(1); … … 498 498 mr_asprintf(extra_cdrom_params, "blank=fast "); 499 499 } 500 tmp = find_home_of_exe("cdrecord"); 501 if (tmp) { 502 mr_asprintf(cdr_exe, "cdrecord"); 500 if (extra_cdrom_params == NULL) { 501 // If not initialized earlier, do it now 502 mr_asprintf(extra_cdrom_params, " "); 503 } 504 if (find_home_of_exe("cdrecord")) { 505 strcpy(cdr_exe, "cdrecord"); 506 } else if (find_home_of_exe("dvdrecord")) { 507 strcpy(cdr_exe, "dvdrecord"); 503 508 } else { 504 509 mr_free(tmp); … … 1181 1186 1182 1187 if (!strcmp(tmp,"")) { 1183 if ((strstr(tmp, "LABEL=") || strstr(tmp,"UUID="))) {1188 if ((strstr(tmp, "LABEL=") != NULL) || (strstr(tmp,"UUID=")!= NULL)) { 1184 1189 if (!run_program_and_log_output("mount /boot", 5)) { 1185 1190 strcpy(g_boot_mountpt, "/boot"); -
branches/2.2.10/mondo/src/include/my-stuff.h
r2635 r2696 119 119 #define MAX_TAPECATALOG_ENTRIES 16384 ///< The maximum number of entries in the tape catalog. 120 120 #define MAX_MOUNTLIST_ENTRIES 8192 ///< The maximum number of entries in the mountlist. 121 #define MAX_STR_LEN 384///< The maximum length of almost all @p char buffers in Mondo.121 #define MAX_STR_LEN 512 ///< The maximum length of almost all @p char buffers in Mondo. 122 122 /// Note: Make this divisible by eight to avoid aligment issues 123 123 /// on 64bit platforms like ia64. -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools-EXT.h
r2623 r2696 7 7 extern int iso_fiddly_bits(bool nuke_me_please); 8 8 extern void kill_petris(void); 9 extern int mount_media();10 9 extern int mount_all_devices(struct mountlist_itself *, bool); 11 10 extern void protect_against_braindead_sysadmins(void); -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.c
r2644 r2696 43 43 extern void kill_anything_like_this(char *str); 44 44 extern int skip_obdr(void); 45 extern int mount_media(); 45 46 extern int set_tape_block_size_with_mt(long internal_tape_block_size); 46 47 … … 460 461 /************************************************************************** 461 462 *END_MOUNT_ALL_DEVICES * 462 **************************************************************************/463 464 465 /**466 * Mount the CD-ROM or USB device at /mnt/cdrom.467 * @param bkpinfo The backup information structure. Fields used:468 * - @c bkpinfo->backup_media_type469 * - @c bkpinfo->disaster_recovery470 * - @c bkpinfo->isodir471 * - @c bkpinfo->media_device472 * @return 0 for success, nonzero for failure.473 */474 int mount_media() {475 476 char *mount_cmd = NULL;477 int i, res;478 #ifdef __FreeBSD__479 char mdd[32];480 char *mddev = mdd;481 #endif482 483 if (bkpinfo->backup_media_type == tape || bkpinfo->backup_media_type == udev) {484 log_msg(8, "Tape/udev. Therefore, no need to mount a media.");485 return 0;486 }487 488 if (!run_program_and_log_output("mount | grep -F "MNT_CDROM, FALSE)) {489 log_msg(2, "mount_media() - media already mounted. Fair enough.");490 return (0);491 }492 493 if (bkpinfo->media_device == NULL) {494 fatal_error("No media device at that point");495 }496 497 if (bkpinfo->backup_media_type == netfs) {498 log_msg(2, "Mounting for Network thingy");499 log_msg(2, "isodir = %s", bkpinfo->isodir);500 if (!strcmp(bkpinfo->isodir, "/") && am_I_in_disaster_recovery_mode()) {501 mr_free(bkpinfo->isodir);502 mr_asprintf(bkpinfo->isodir, "/tmp/isodir");503 log_msg(1, "isodir is being set to %s", bkpinfo->isodir);504 }505 if ((bkpinfo->isodir == NULL) || (bkpinfo->netfs_remote_dir == NULL) || (bkpinfo->prefix == NULL)) {506 fatal_error("Unable to prepare the iso filename");507 }508 #ifdef __FreeBSD__509 mr_asprintf(mount_cmd, "/mnt/isodir/%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->netfs_remote_dir, bkpinfo->prefix, g_current_media_number);510 mddev = make_vn(mount_cmd);511 mr_free(mount_cmd);512 513 mr_asprintf(mount_cmd, "mount_cd9660 -r %s "MNT_CDROM, mddev);514 #else515 mr_asprintf(mount_cmd, "mount %s/%s/%s-%d.iso -t iso9660 -o loop,ro %s", bkpinfo->isodir, bkpinfo->netfs_remote_dir, bkpinfo->prefix, g_current_media_number, MNT_CDROM);516 #endif517 518 } else if (bkpinfo->backup_media_type == iso) {519 #ifdef __FreeBSD__520 mr_asprintf(mount_cmd, "%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->prefix, g_current_media_number);521 mddev = make_vn(mount_cmd);522 mr_free(mount_cmd);523 524 mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", mddev, MNT_CDROM);525 #else526 mr_asprintf(mount_cmd, "mount %s/%s-%d.iso -t iso9660 -o loop,ro %s", bkpinfo->isodir, bkpinfo->prefix, g_current_media_number, MNT_CDROM);527 #endif528 } else if (bkpinfo->backup_media_type == usb) {529 mr_asprintf(mount_cmd, "mount -t vfat %s %s", bkpinfo->media_device, MNT_CDROM);530 } else if (strstr(bkpinfo->media_device, "/dev/")) {531 #ifdef __FreeBSD__532 mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device, MNT_CDROM);533 #else534 mr_asprintf(mount_cmd, "mount %s -t iso9660 -o ro %s", bkpinfo->media_device, MNT_CDROM);535 #endif536 } else {537 mr_free(bkpinfo->media_device);538 if (bkpinfo->disaster_recovery && does_file_exist(MINDI_CACHE"/CDROM-LIVES-HERE")) {539 bkpinfo->media_device = last_line_of_file(MINDI_CACHE"/CDROM-LIVES-HERE");540 } else {541 bkpinfo->media_device = find_cdrom_device(TRUE);542 }543 544 #ifdef __FreeBSD__545 mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device, MNT_CDROM);546 #else547 mr_asprintf(mount_cmd, "mount %s -t iso9660 -o ro %s", bkpinfo->media_device, MNT_CDROM);548 #endif549 }550 551 log_msg(2, "(mount_media) --- command = %s", mount_cmd);552 for (i = 0; i < 2; i++) {553 res = run_program_and_log_output(mount_cmd, FALSE);554 if (!res) {555 break;556 } else {557 log_msg(2, "Failed to mount device.");558 sleep(5);559 sync();560 }561 }562 mr_free(mount_cmd);563 564 if (res) {565 log_msg(2, "Failed, despite %d attempts", i);566 } else {567 log_msg(2, "Mounted media drive OK");568 }569 return (res);570 }571 /**************************************************************************572 *END_MOUNT_CDROM *573 463 **************************************************************************/ 574 464 -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.h
r2623 r2696 7 7 int iso_fiddly_bits(bool nuke_me_please); 8 8 void kill_petris(void); 9 int mount_media();10 9 int mount_device(char *, char *, char *, bool); 11 10 int mount_all_devices(struct mountlist_itself *, bool); -
branches/2.2.10/mondo/src/mondorestore/mondorestore.c
r2623 r2696 50 50 extern int partition_everything(struct mountlist_itself *mountlist); 51 51 extern int handle_incoming_parameters(int argc, char *argv[]); 52 extern int mount_media(); 52 53 53 54 /** … … 2485 2486 2486 2487 mvaddstr_and_log_it(g_currentY, 0, "Preparing to read your archives"); 2488 mount_media(); 2487 2489 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 2488 mount_media();2489 2490 mvaddstr_and_log_it(g_currentY++, 0, 2490 2491 "Restoring OS and data from streaming media"); … … 2504 2505 mvaddstr_and_log_it(g_currentY++, 0, 2505 2506 "Restoring OS and data from CD/USB "); 2506 mount_media();2507 2507 resA = restore_all_tarballs_from_CD(filelist); 2508 2508 resB = restore_all_biggiefiles_from_CD(filelist); -
branches/2.2.10/mondo/src/restore-scripts/mondo/grub-MR
r2635 r2696 103 103 fi 104 104 105 # For some OpenSuSE 106 res=1 107 if [ "$MNT_RESTORING" ] ; then 108 if [ -x $MNT_RESTORING/usr/sbin/grub-install.unsupported ]; then 109 echo "Now I'll use grub-install.unsupported in chroot" >> $LOGFILE 110 chroot $MNT_RESTORING /usr/sbin/grub-install.unsupported $1 >> $LOGFILE 2>> $LOGFILE 111 res=$? 112 echo "grub-install.unsupported in chroot returned $res" >> $LOGFILE 113 fi 114 else 115 if [ -x /usr/sbin/grub-install.unsupported ]; then 116 echo "Now I'll use grub-install.unsupported locally" >> $LOGFILE 117 /usr/sbin/grub-install.unsupported $1 >> $LOGFILE 2>> $LOGFILE 118 res=$? 119 echo "grub-install.unsupported returned $res" >> $LOGFILE 120 fi 121 fi 122 [ "$res" -eq "0" ] && exit 0 123 105 124 echo "Now I'll use grub-install" >> $LOGFILE 106 125 if [ "$MNT_RESTORING" ] ; then 107 chroot $MNT_RESTORING grub-install $1 2>&1 | tee -a$LOGFILE126 chroot $MNT_RESTORING grub-install $1 >> $LOGFILE 2>> $LOGFILE 108 127 res=$? 109 128 else 110 grub-install $1 2>&1 | tee -a$LOGFILE129 grub-install $1 >> $LOGFILE 2>> $LOGFILE 111 130 res=$? 112 131 fi 113 132 echo "grub-install returned $res" >> $LOGFILE 114 [ "$res" -eq "0" ] && exit 0115 116 # For some OpenSuSE117 echo "Now I'll use grub-install.unsupported" >> $LOGFILE118 if [ "$MNT_RESTORING" ] ; then119 chroot $MNT_RESTORING grub-install.unsupported $1 2>&1 | tee -a $LOGFILE120 res=$?121 else122 grub-install.unsupported $1 2>&1 | tee -a $LOGFILE123 res=$?124 fi125 echo "grub-install.unsupported returned $res" >> $LOGFILE126 133 [ "$res" -eq "0" ] && exit 0 127 134 … … 172 179 echo "Now I'll use grub-install.patched" >> $LOGFILE 173 180 cp -f `which grub-install.patched` /mnt/RESTORING/sbin 174 chroot /mnt/RESTORING grub-install.patched $1 2>&1 | tee -a$LOGFILE181 chroot /mnt/RESTORING grub-install.patched $1 >> $LOGFILE 2>> $LOGFILE 175 182 res=$? 176 183 echo "grub-install.patched returned $res" >> $LOGFILE -
branches/2.2.10/website/docs.shtml
r2635 r2696 23 23 </ul> 24 24 <p>The Mondo Rescue HOWTO has also been translated in german by Magnus Rasche (Magnus.rasche_at_gmx.de):</p> 25 <ul> 25 26 <li>A <a href="/docs/mondorescue-howto-de.pdf" target="_blank">PDF</a> document. (<a href="ftp://ftp.mandrivauser.de/magazin/mondorescue-howto-de.pdf">Reference</a> site)</li> 27 </ul> 26 28 27 29 <div class="h2-3"> … … 59 61 <ul> 60 62 <li>A Mondo Rescue <a href="/docs/mondo-intro.pdf" target="_blank">introduction</a> (in French) made by Gallig Renaud. 61 <li>A Mondo Rescue <a href="http://trac.mondorescue.org/browser/branches/stable/mondo-doc/mondo-presentation.odp" target="_blank">presentation</a> made by Bruno Cornec. (Older versions also available: <a href="/docs/mondo-presentation-v1.pdf" target="_blank">v1</a>,<a href="/docs/mondo-presentation-v2.pdf" target="_blank">v2</a>) 63 <li>A Mondo Rescue <a href="http://trac.mondorescue.org/browser/devel/mondo-doc/mondo-presentation.odp" target="_blank">presentation</a> made by Bruno Cornec. (Older versions also available: <a href="/docs/mondo-presentation-v1.pdf" target="_blank">v1</a>,<a href="/docs/mondo-presentation-v2.pdf" target="_blank">v2</a>) 64 <li>A mondoarchive <a href="/docs/mondo-ref-card.pdf" target="_blank">reference card</a> made by Lester Wade.. 62 65 <li><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a> <span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type"><a href="http://www.mondorescue.org/docs/p2v.pdf">Linux P2V migrations using MondoRescue</a></span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://opensource.hp.com" property="cc:attributionName" rel="cc:attributionURL">Lester Wade</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dc="http://purl.org/dc/elements/1.1/" href="/docs/p2v.odt" rel="dc:source">trac.mondorescue.org</a>. 66 <li>A now obsoleted by the previous Mondo Rescue hardware migration (including P2V with VMWare) <a href="/docs/hwmigration.pdf" target="_blank">guide</a> made by Gallig Renaud, Eric Montaut and François-Xavier Horel. (<a href="/docs/HOWTO-_Deploy_Linux_from_SCSI_to_SATA.pdf" target="_blank">previous version</a>) 63 67 <li><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a> <span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type">The <a href="/docs/LabMondoRescue.pdf" target="_blank">MondoRescue Lab</a></span>: Experience yourself MondoRescue by following those Lab instructions ! Should provide you with at least 2 hours of fun discovering the tool with detailed explanations. This Lab has been developed for an internal HP Open Source and Linux Event I contributed to organize (TES 2009). Highly recommended to have a good tour of the features. By <a xmlns:cc="http://creativecommons.org/ns#" href="http://opensource.hp.com" property="cc:attributionName" rel="cc:attributionURL">Bruno Cornec</a> and licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dc="http://purl.org/dc/elements/1.1/" href="/docs/LabMondoRescue.odt" rel="dc:source">trac.mondorescue.org</a>. 64 <li>A now obsoleted by the previous Mondo Rescue hardware migration (including P2V with VMWare) <a href="/docs/hwmigration.pdf" target="_blank">guide</a> made by Gallig Renaud, Eric Montaut and François-Xavier Horel. (<a href="/docs/HOWTO-_Deploy_Linux_from_SCSI_to_SATA.pdf" target="_blank">previous version</a>) 68 <li>Other useful docs can be found on the <a href="http://trac.mondorescue.org/wiki/Communication#Articlesonmondorescue">Wiki</a> 69 </ul> 65 70 66 71 <!--#include virtual="/bottom.shtml" -->
Note:
See TracChangeset
for help on using the changeset viewer.