Changeset 2937 in MondoRescue for branches/3.1/mindi/mindi
- Timestamp:
- Jan 28, 2012, 1:51:28 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/mindi/mindi
r2874 r2937 36 36 37 37 EXTRA_SPACE=80152 # increase if you run out of ramdisk space 38 BOOT_SIZE=3 2768# size of the boot disk38 BOOT_SIZE=36864 # size of the boot disk 39 39 40 40 PROMPT_MAKE_CD_IMAGE="yes" … … 54 54 # If set to "no", the kernel is not a Xen kernel 55 55 # If "yes", mindi will modify isolinux.cfg for the Xen kernel. 56 xenkernelpath="" 56 57 57 58 MY_FSTAB=/etc/fstab … … 60 61 61 62 # 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 ide_gd_mod edd paride ata_generic ide_pci_generic ata_piix libata dock via82cxxx generic nvidia ahci libahci 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 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 libahci sata_nv cmd64x pata_amd pata_marvell pata_serverworks pata_sis pata_sil680 pata_jmicron pata_atiixp amd74xx sis5513 jmicron sata_promise sata_via serverworks sata_svw blkbk virtio virtio_ring virtio_pci virtio_blk virtio_balloon" 63 64 PCMCIA_MODS="pcmcia_core ds yenta_socket" 64 65 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 usbserial" 65 NET_MODS="auth_rpcgss sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 bnx2x mdio 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 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 "66 NET_MODS="auth_rpcgss sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 bnx2x bnx2i mdio e1000 e1000e igb dca eepro100 ne2k-pci tg3 libphy pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmxnet3 vmnet exportfs fuse libcrc32c crc32c netbk xenblktap r8169 virtio_net" 67 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 vfat fat" 67 68 # Those modules will only go on the backup media, not the boot media. 68 EXTRA_MODS="$CDROM_MODS vfat fatloop md-mod linear raid0 raid1 xor raid10 raid5 raid456 raid6_pq async_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 dm-region-hash dm-snapshot dm-log 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 EXTRA_MODS="$CDROM_MODS loop md-mod linear raid0 raid1 xor raid10 raid5 raid456 raid6_pq async_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 dm-region-hash dm-snapshot dm-log 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 70 # Replace with that line for HP OCMP e.g. 70 71 #DENY_MODS="MPS_Driver_Mapper mps octtldrv tscttl streams kqemu fdomain" … … 72 73 # Force some modules to be included 73 74 FORCE_MODS="" 75 76 # Find MBR in case of bootable USB device to build 77 MBRFILE=/usr/lib/syslinux/mbr.bin 78 [ ! -r "$MBRFILE" ] && MBRFILE=/usr/lib64/syslinux/mbr.bin 79 [ ! -r "$MBRFILE" ] && MBRFILE=/usr/share/syslinux/mbr.bin 80 [ ! -r "$MBRFILE" ] && MBRFILE=/usr/share/lib/syslinux/mbr.bin 81 [ ! -r "$MBRFILE" ] && MBRFILE=/usr/share/lib64/syslinux/mbr.bin 74 82 75 83 LOGFILE=/var/log/mindi.log … … 132 140 } 133 141 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 142 LogOnly() { 140 143 echo -e "$1" >> $LOGFILE 141 144 if [ _"$2" != _"" ]; then … … 143 146 fi 144 147 rm -f "$2" 148 } 149 150 # Function to log on screen only 151 LogScreen() { 152 if [ -e /dev/stderr ] ; then 153 echo -e "$1" >> /dev/stderr 154 elif [ -e /usr/bin/logger ] ; then 155 /usr/bin/logger -s $1 156 fi 157 } 158 159 # Function to log in log file only 160 LogFile() { 161 162 echo -e "$1" >> $LOGFILE 163 if [ _"$2" != _"" ]; then 164 grep -Ev "tar: Removing \`/\'" "$2" >> $LOGFILE 165 fi 166 rm -f "$2" 167 } 168 169 # Function to log in both screen and logfile 170 LogAll() { 171 LogScreen "$1" 172 LogFile "$1" "$2" 173 } 174 175 # Preserved for compatibility 176 LogIt() { 177 LogAll "$1" "$2" 145 178 } 146 179 … … 369 402 mkdir -p $bigdir/etc/console 370 403 cp /etc/console/boottime.kmap.gz $bigdir/etc/console 2>> $LOGFILE 404 echo "" 371 405 echo -e "$DONE" 372 406 return 0 … … 383 417 mkdir -p $bigdir/etc/console-setup 384 418 cp $kbdfile $bigdir/etc/console-setup 2>> $LOGFILE 419 echo "" 385 420 echo -e "$DONE" 386 421 return 0 … … 439 474 KBDEPTH=0 440 475 AddKeyboardMappingFile $mappath 476 echo "" 441 477 echo -e "$DONE" 442 478 rm -f $MINDI_TMP/keymaps.find … … 453 489 [ ! -e "$MBOOTC32" ] && MBOOTC32=/usr/share/lib64/syslinux/mboot.c32 454 490 [ ! -e "$MBOOTC32" ] && MBOOTC32=`find / -name mboot.c32 | grep -x "/.*/mboot.c32"` 455 [ ! -e "$MBOOTC32" ] && Die "Please install mboot.c32 first. If your syslinux RPM doesn't include mboot.c32, you may download an isolinux RPM from Mondo's website - go to http://www.mondorescue. com and click on 'Download'"491 [ ! -e "$MBOOTC32" ] && Die "Please install mboot.c32 first. If your syslinux RPM doesn't include mboot.c32, you may download an isolinux RPM from Mondo's website - go to http://www.mondorescue.org/downloads.shtml" 456 492 LogFile "Found mboot.c32 at $MBOOTC32" 457 493 } … … 465 501 [ ! -e "$ISOLINUX" ] && ISOLINUX=/usr/share/lib64/syslinux/isolinux.bin 466 502 [ ! -e "$ISOLINUX" ] && ISOLINUX=`find / -name isolinux.bin | grep -x "/.*/isolinux.bin"` 467 [ ! -e "$ISOLINUX" ] && Die "Please install isolinux first. If your syslinux RPM doesn't include isolinux, you may download an isolinux RPM from Mondo's website - go to http://www.mondorescue. com and click on 'Download'"503 [ ! -e "$ISOLINUX" ] && Die "Please install isolinux first. If your syslinux RPM doesn't include isolinux, you may download an isolinux RPM from Mondo's website - go to http://www.mondorescue.org/downloads.shtml" 468 504 LogFile "Found isolinux.bin at $ISOLINUX" 469 505 } … … 704 740 # $1: raid device (/dev/md...) 705 741 GetRaidDevMembers() { 742 if [ ! -f /etc/raidtab ]; then 743 return 744 fi 706 745 $AWK "/^[[:space:]]*#/ {next} /^[[:space:]]*raiddev/ {if(dev) exit; if(\$2 == \"$1\") dev=\$2} /^[[:space:]]*device/ {if(dev) {print \$2}}" < /etc/raidtab 707 746 } … … 977 1016 978 1017 MakeMountlist() { 979 local scratchdirmountlist all_partitions current_partition \1018 local mountlist all_partitions current_partition \ 980 1019 partition_size partition_format outstring partition_number \ 981 1020 partition_mountpt c_p lwm_info psz lvm_dev unofficial_outstring \ … … 990 1029 LogAll "-----------------------------------" 991 1030 992 # scratchdir, mountlist(OUT) 993 scratchdir=$MINDI_TMP 1031 # mountlist(OUT) 994 1032 mountlist=$1 995 1033 … … 1019 1057 printf "%-15s %-15s %-15s %s %s\n" DEVICE MOUNTPOINT FORMAT "SIZE MB" LABEL/UUID | tee -a $LOGFILE 1020 1058 printf "%-15s %-15s %-15s %s %s\n" ------ ---------- ------ ------- ---------- | tee -a $LOGFILE 1021 useless_dev="/dev/floppy /dev/fd0h1440 /dev/fd0H1440 /dev/cdrom /dev/cdrom/cdrom /dev/cdrom/cdrom1 /dev/cdrom/cdrom2 /dev/cdrom0 /dev/cdrom1 /dev/cdrom2 /dev/cdrom3 /dev/cdrw /dev/scd /dev/ram :/ /dev/sr0 /dev/sr1 /dev/cdrom1 "1059 useless_dev="/dev/floppy /dev/fd0h1440 /dev/fd0H1440 /dev/cdrom /dev/cdrom/cdrom /dev/cdrom/cdrom1 /dev/cdrom/cdrom2 /dev/cdrom0 /dev/cdrom1 /dev/cdrom2 /dev/cdrom3 /dev/cdrw /dev/scd /dev/ram :/ /dev/sr0 /dev/sr1 /dev/cdrom1 tmpfs devpts sysfs proc debugfs" 1022 1060 for c_p in $all_partitions ; do 1023 # Skip evices, network FS, cisf1061 # Skip fd/cd devices, network FS, cifs 1024 1062 [ "`echo "$useless_dev" | grep -F "$c_p"`" != "" ] || [ "`echo "$c_p" | grep ":"`" != "" ] || [ "`echo "$c_p" | grep -E "^//"`" != "" ]&& continue 1025 1063 [ "`echo "$c_p" | grep -x "/dev/cdroms.*"`" ] && continue … … 1032 1070 fi 1033 1071 [ "$c_p" = "none" ] && continue 1034 # Debian 5 does that1035 [ "$c_p" = "proc" ] && continue1036 1072 redhat_label="" 1037 1073 label="" … … 1110 1146 [ "`echo $uname | grep "2.6.19"`" != "" ] && skip=1052 1111 1147 [ "`echo $uname | grep "2.6.[2-9]"`" != "" ] && skip=1052 1148 [ "`echo $uname | grep "3.[0-9]*.[0-9]*"`" != "" ] && skip=1052 1112 1149 if [ $skip = "" ]; then 1113 1150 Die "Your kernel is too old. I don't know how to support labelled swap spaces with it" … … 1218 1255 list_of_devices="`echo $l | sort -u`" 1219 1256 1220 for d in $MINDI_EXCLUDE_DEVS; do1257 for d in `echo $MINDI_EXCLUDE_DEVS | sed 's/|/ /g'`; do 1221 1258 if [ "`echo " $list_of_devices " | grep " $d"`" != "" ]; then 1222 1259 echo "Excluding $current_partition from mountlist (due to excluded device $d)" >> $LOGFILE … … 1268 1305 [ "`echo "$current_partition" | grep -c "^/"`" -ne "1" ] && continue 1269 1306 if [ "$partition_format" = "swap" ] || [ "$partition_mountpt" = "swap" ] ; then 1270 partition_size=`grep -Fv "Priority" /proc/swaps | tr -s '\t' ' ' | grep -F "$current_partition " | $AWK '{print $3}'`1307 partition_size=`grep -Fv "Priority" /proc/swaps | tr -s '\t' ' ' | grep -F "$current_partition " | $AWK '{print $3}'` 1271 1308 [ "$partition_mountpt" != "swap" ] && partition_mountpt="swap" 1272 1309 [ "$partition_format" != "swap" ] && partition_format="swap" … … 1487 1524 LogFile "Transforming $USBDEVICE in a Bootable device" 1488 1525 LogFile "Checking $USBDEVICE" 1489 $FDISK -l $USBDEVICE 2> > $LOGFILE 1>> $LOGFILE1526 $FDISK -l $USBDEVICE 2>&1 >> $LOGFILE 1490 1527 if [ $? -ne 0 ]; then 1491 1528 LogAll "Unable to access $USBDEVICE" … … 1499 1536 # If your key has no MBR it may cause an issue 1500 1537 # Use dd if=mbr.bin of=$USBDEVICE or ms-sys -s $USBDEVICE 1538 if [ -r $MBRFILE ]; then 1539 LogFile "Installing an MBR ($MBRFILE) on $USBDEVICE" 1540 dd if=$MBRFILE of=$USBDEVICE 1541 else 1542 LogFile "You may need to install an MBR (usually in $MBRFILE, but not found on your system) " 1543 LogFile "on $USBDEVICE with dd if=$MBRFILE of=$USBDEVICE" 1544 fi 1501 1545 LogFile "Preparing $USBDEVICE" 1502 $FDISK $USBDEVICE 2>> $LOGFILE 1>> $LOGFILE<< EOF1546 cat > $MINDI_TMP/fdisk.txt << EOF 1503 1547 d 1504 1548 d … … 1516 1560 w 1517 1561 EOF 1562 $FDISK $USBDEVICE 2>> $LOGFILE 1>> $LOGFILE < $MINDI_TMP/fdisk.txt 1518 1563 if [ $? -ne 0 ]; then 1519 1564 LogAll "Unable to create a vfat Filesystem on $USBDEVICE" … … 1522 1567 MindiExit -1 1523 1568 fi 1569 LogFile "fdisk build file" 1570 LogFile "----------------" 1571 cat $MINDI_TMP/fdisk.txt >> $LOGFILE 1572 LogFile "----------------" 1573 rm -f $MINDI_TMP/fdisk.txt 1524 1574 LogFile "The USB device $USBDEVICE now looks like this:" 1525 1575 $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE … … 2023 2073 local devpath drive res stub 2024 2074 device=$1 2075 if [ "`echo "$device" | grep -E "^/dev/"`" = "" ] ; then 2076 Die "Cannot find $device's size - is your /etc/fstab sane?" 2077 fi 2025 2078 if [ "`echo "$device" | grep -F "/dev/md"`" != "" ] ; then 2026 2079 res=`SizeOfRaidPartition $device` … … 2091 2144 2092 2145 2146 # WARNING: This function should just echo the final result !!! 2147 # 2093 2148 TryToFindKernelPath() { 2094 local fname incoming res fkern_ver we_want_version possible_kernels noof_kernels kernelpath kdate duff_kernels2149 local fname fkern_ver we_want_version possible_kernels noof_kernels possible_xenkernels noof_xenkernels kp kdate duff_kernels output root 2095 2150 2096 2151 we_want_version=$KERVERRUN 2097 2152 possible_kernels="" 2098 2153 duff_kernels="" 2154 output="" 2099 2155 2100 2156 if [ "$ARCH" = "ia64" ] ; then … … 2104 2160 fi 2105 2161 # See if we're booted from a Xen kernel 2106 if [ -d /proc/sys/xen ]; then 2162 # From http://wiki.xensource.com/xenwiki/XenCommonProblems#head-26434581604cc8357d9762aaaf040e8d87b37752 2163 if [ -f /proc/xen/capabilities ]; then 2107 2164 # It's a Xen kernel 2108 2165 KERNEL_IS_XEN="yes" 2109 Log It"It's a Xen kernel..."2166 LogFile "It's a Xen kernel..." 2110 2167 fi 2111 2168 … … 2168 2225 fi 2169 2226 elif [ "$noof_kernels" -eq "1" ] ; then 2170 k ernelpath=`echo "$possible_kernels" | sed s/' '//`2171 LogFile "Your kernel is $k ernelpath (v$KERVERRUN)"2172 output="$k ernelpath"2227 kp=`echo "$possible_kernels" | sed s/' '//` 2228 LogFile "Your kernel is $kp (v$KERVERRUN)" 2229 output="$kp" 2173 2230 else 2174 2231 for i in $possible_kernels ; do 2175 if echo $i | grep "$KERVERRUN"; then2232 if [ "`echo $i | grep "$KERVERRUN"`" ]; then 2176 2233 LogAll "OK, I used my initiative and found that " 2177 2234 LogAll "$i is probably your kernel. " 2178 2235 output="$i" 2236 break 2179 2237 fi 2180 2238 done 2181 if [ -n "$output" ]; then2182 if echo " $possible_kernels " | grep -F "/boot/vmlinuz " &> /dev/null; then2239 if [ ! -n "$output" ]; then 2240 if [ "`echo " $possible_kernels " | grep -F "/boot/vmlinuz " &> /dev/null`" ]; then 2183 2241 output=/boot/vmlinuz 2184 echo "Schlomo, this one's for you." >> $LOGFILE2242 LogFile "Schlomo, this one's for you." 2185 2243 else 2186 Log It"Two or more possible kernels found. You may specify any one of them and the "2187 Log It"boot disks will still work, probably. If one does not work, try another."2188 Log It"$possible_kernels"2189 echo""2244 LogFile "Two or more possible kernels found. You may specify any one of them and the " 2245 LogFile "boot disks will still work, probably. If one does not work, try another." 2246 LogFile "$possible_kernels" 2247 output="" 2190 2248 fi 2191 2249 fi … … 2196 2254 elif [ "$noof_xenkernels" -eq "1" ]; then 2197 2255 xenkernelpath=`echo "$possible_xenkernels" | sed s/' '//` 2198 echo "Your Xen kernel is $xenkernelpath (v$KERVERRUN)" >> $LOGFILE2256 LogFile "Your Xen kernel is $xenkernelpath (v$KERVERRUN)" 2199 2257 else 2200 2258 for i in $possible_xenkernels ; do 2201 if echo $i | grep "$KERVERRUN"; then2202 Log It"OK, I used my initiative and found that "2203 LogIt"$i is probably your Xen kernel. "2259 if [ "`echo $i | grep "$KERVERRUN"`" ]; then 2260 LogFile "OK, I used my initiative and found that " 2261 LogFile "$i is probably your Xen kernel. " 2204 2262 xenkernelpath="$i" 2263 break 2205 2264 fi 2206 2265 done 2207 if [ -n "$xenkernelpath" ]; then2266 if [ ! -n "$xenkernelpath" ]; then 2208 2267 new_possible_xenkernels=`echo "$possible_xenkernels" | tr -s ' ' '\n' | grep -E "^/boot" | sort -u | tr '\n' ' '` 2209 2268 if [ ! -n "$new_possible_xenkernels" ]; then 2210 2269 xenkernelpath=`echo $new_possible_xenkernels | tr -s ' ' '\n' | head -1` 2211 Log It"Using $xenkernelpath"2270 LogFile "Using $xenkernelpath" 2212 2271 else 2213 LogIt"Two or more possible Xen kernels found. You may specify any one of them and the "2214 Log It"boot disks will still work, probably. If one does not work, try another."2215 LogIt"$possible_xenkernels"2216 echo""2272 LogFile "Two or more possible Xen kernels found. You may specify any one of them and the " 2273 LogFile "boot disks will still work, probably. If one does not work, try another." 2274 LogFile "$possible_xenkernels" 2275 output="" 2217 2276 xenkernelpath=`echo $possible_xenkernels | tr -s ' ' '\n' | head -1` 2218 Log It"Using $xenkernelpath"2277 LogFile "Using $xenkernelpath" 2219 2278 fi 2220 2279 fi 2221 2280 fi 2222 xenkernelname=`basename $xenkernelpath`2223 2281 if [[ -z "$xenkernelpath" || ! -f "$xenkernelpath" ]]; then 2224 2282 Die "Cannot find Xen kernel $xenkernelpath, aborting" 2225 2283 fi 2226 2284 fi 2285 LogAll "TryToFindKernelPath found $output" 2227 2286 echo "$output" 2228 2287 } … … 2258 2317 echo `cat $MINDI_TMP/mnt.lis` `sort -u $MINDI_TMP/deps.lis` >> $MINDI_TMP/cp.lis 2259 2318 rm -f $MINDI_TMP/deps.lis $MINDI_TMP/mnt.lis 2319 2320 # Copy of files mandatory for ssh to automate mount if sshfs is used 2321 echo .ssh >> $MINDI_TMP/mkdir.lis 2322 echo ~root/.ssh/* >> $MINDI_TMP/cp.lis 2323 echo > $mountpoint/tmp/myssh << EOF 2324 ssh -o StrictHostKeyChecking=no $* 2325 EOF 2326 chmod 755 $mountpoint/tmp/myssh 2327 echo $mountpoint/tmp/myssh >> $MINDI_TMP/cp.lis 2260 2328 2261 2329 # Copy of files mandatory for ld.so … … 2279 2347 # This avoids NIC remapping if on another machine at restore time on Ubuntu at least 2280 2348 echo ./etc/udev/rules.d/[0-9][0-9]-persistent-net.rules >> $MINDI_TMP/rm.lis 2349 2350 # Do not do it if it's a link (Ubuntu 64 bits #503) 2351 if [ -e "/lib64/udev" ] && [ ! -h "/lib64" ] && [ ! -h "/lib64/udev" ]; then 2352 echo /lib64/udev >> $MINDI_TMP/mkdir.lis 2353 echo /lib64/udev/* >> $MINDI_TMP/cp.lis 2354 fi 2355 if [ -e "/lib32/udev" ] && [ ! -h "/lib32" ] && [ ! -h "/lib32/udev" ]; then 2356 echo /lib32/udev >> $MINDI_TMP/mkdir.lis 2357 echo /lib32/udev/* >> $MINDI_TMP/cp.lis 2358 fi 2359 if [ -e "/lib/udev" ] && [ ! -h "/lib" ] && [ ! -h "/lib/udev" ]; then 2360 echo /lib/udev >> $MINDI_TMP/mkdir.lis 2361 echo /lib/udev/* >> $MINDI_TMP/cp.lis 2362 fi 2281 2363 if [ -x /sbin/udevd ]; then 2282 2364 # Get only the files which exist in the udev.files list … … 2296 2378 fi 2297 2379 2298 # Management of potential HW info (Pro liant only at the moment)2380 # Management of potential HW info (ProLiant only at the moment) 2299 2381 rm -rf $MINDI_CACHE/bkphw 2300 2382 mindi-bkphw $MINDI_CACHE $MINDI_CONF | tee -a $LOGFILE … … 2371 2453 echo "lib/firmware" >> $MINDI_TMP/mkdir.lis 2372 2454 echo "/lib/firmware" >> $MINDI_TMP/cp.lis 2455 fi 2456 2457 # Copy an additional ProLiant tool for OBDR support 2458 if [ -f $MINDI_TMP/OBDR ]; then 2459 if [ -x /usr/bin/hpsa_obdr_mode ]; then 2460 echo $mountpoint/usr/bin >> $MINDI_TMP/mkdir.lis 2461 echo /usr/bin/hpsa_obdr_mode >> $MINDI_TMP/cp.lis 2462 LogIt "Copying /usr/bin/hpsa_obdr_mode to ramdisk for improved OBDR support" 2463 else 2464 LogAll "WARNING: You're using OBDR mode without having the /usr/bin/hpsa_obdr_mode tool" 2465 LogAll " This may lead to a tape not going back to sequential mode after OBDR boot" 2466 fi 2373 2467 fi 2374 2468 … … 2418 2512 # Finally remove useless stff 2419 2513 (cd $mountpoint ; rm -f `cat $MINDI_TMP/rm.lis`) 2>&1 >> $LOGFILE 2420 2421 # Copy of files mandatory for ssh to automate mount if sshfs is used2422 cp -rp ~root/.ssh/*.pub ~root/.ssh/config ~root/.ssh/known* $mountpoint/.ssh 2> /dev/null2423 cat > $mountpoint/bin/myssh << EOF2424 ssh -o StrictHostKeyChecking=no $*2425 EOF2426 chmod 755 $mountpoint/bin/myssh2427 2514 2428 2515 # Finally integrate what we provide statically as part of mindi … … 2695 2782 if [ "$#" -ne "0" ] ; then 2696 2783 if [ "$1" = "--findkernel" ] ; then 2697 res =`TryToFindKernelPath`2784 resk=`TryToFindKernelPath` 2698 2785 # Avoids logfile content for mondo 2699 2786 export MONDO_SHARE="" 2700 if [ "$res " = "" ] ; then2787 if [ "$resk" = "" ] ; then 2701 2788 if [ $KERNEL_IS_XEN = "yes" ]; then 2702 2789 echo "$xenkernelpath" 2703 MindiExit 0 2790 LogOnly "xenkernelpath = $xenkernelpath" 2791 MindiExit 0 2704 2792 else 2705 2793 MindiExit -1 2706 2794 fi 2707 2795 else 2708 echo "$res" 2709 MindiExit 0 2796 echo "$resk" 2797 LogOnly "kernelpath = $resk" 2798 MindiExit 0 2710 2799 fi 2711 2800 elif [ "$1" = "--locatedeps" ] ; then … … 2765 2854 if [ $KERNEL_IS_XEN = "yes" ]; then 2766 2855 LogAll "xenkernelpath = $xenkernelpath" 2767 LogAll "xenkernelname = $xenkernelname"2768 2856 fi 2769 2857 kernelname=`echo $kernelpath | cut -d'-' -f2- | sed 's/.[bg]z[2]*$//'`
Note:
See TracChangeset
for help on using the changeset viewer.