Changeset 764 in MondoRescue
- Timestamp:
- Aug 8, 2006, 12:34:37 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 52 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/mindi-kernel/distributions/mandriva/spec.m4
r729 r764 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version} -TTT.tar.bz2')dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 6 define(`DDD', `')dnl -
trunk/mindi-kernel/distributions/redhat/spec.m4
r729 r764 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version} -TTT.tar.gz')dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.gz')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 6 define(`DDD', `')dnl -
trunk/mindi-kernel/distributions/suse/spec.m4
r729 r764 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version} -TTT.tar.bz2')dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 6 define(`DDD', `, syslinux')dnl -
trunk/mindi/ChangeLog
r687 r764 3 3 MINDI CHANGES 4 4 5 1.0.9 (2006-06-26) 5 1.0.9 (2006-08-05) 6 - Fix for bug #22 RHEL4 + LVM + LABEL support (Bruno Cornec) 7 - Fix for bug #8 keyboard support incorrect (Bruno Cornec) 8 - New NFS/PXE support. start-nfs is now a fixed script. Allow more possibilities at restore time (Bruno Cornec) 9 - new global variables + Bug fixes for LVM (Bruno Cornec) 10 - SuSE RPMS now use bzip2 (Lars Rupp/Bruno Cornec) 11 - Fix a bug for filesystems with LABEL in fstab not mounted (Bruno Cornec) 12 - Qlogic 2300 and 2200 are now supported (Bruno Cornec) 13 - Use busybox 1.1.3 for net part (Bruno Cornec) 14 - Fix various screen corruption for 'Configure LVM' (Andree Leidenfrost) 15 - Fix Adaptec Zero-Channel RAID Cards support bug #6455 (Bruno Cornec) 16 - Fix a bug with redhat_label not initialized in the loop systematically 17 (Anthony P. Machon/Bruno Cornec) 6 18 - nfsmount option added to allow redeployment from another NFS server (Bruno Cornec) 7 19 - Replaced all occurrences of egrep with 'grep -E' and of fgrep with 'grep -F' (Andree Leidenfrost) -
trunk/mindi/README
r270 r764 28 28 29 29 You can get the latest packages from 30 http://developer.berlios.de/project/showfiles.php?group_id=2524. 30 ftp://ftp.mondorescue.org 31 31 32 32 Please see file 'INSTALL' for instructions about how to build and install … … 50 50 51 51 Apart from the above-mentioned documentation, there is a Wiki with growing 52 contents at the following URL: http:// developer.berlios.de/wiki/?group_id=2524.52 contents at the following URL: http://www.mondorescue.org/cgi-bin/trac.cgi/wiki 53 53 54 54 Also, there is a mailing list mondo-devel@lists.sourceforge.net. Please go to -
trunk/mindi/analyze-my-lvm
r729 r764 169 169 170 170 ListLvmDrivesAndPartitions() { 171 $LVMCMD vgdisplay -v |grep "PV Name" | sed 's/(#)//' | awk '{print $3}'171 $LVMCMD vgdisplay -v 2> /dev/null |grep "PV Name" | sed 's/(#)//' | awk '{print $3}' 172 172 } 173 173 -
trunk/mindi/distributions/gentoo/mindi.ebuild
r588 r764 7 7 DESCRIPTION="A program that creates emergency boot disks/CDs using your kernel, tools and modules." 8 8 HOMEPAGE="http://www.mondorescue.org" 9 SRC_URI="ftp://ftp.mondorescue.org/src/${P VR}.tar.gz"9 SRC_URI="ftp://ftp.mondorescue.org/src/${P}.tar.gz" 10 10 11 11 LICENSE="GPL-2" … … 30 30 export DONT_RELINK=1 31 31 export RPMBUILDMINDI="true" 32 ./install.sh32 ${WORKDIR}/${P}/install.sh 33 33 } 34 34 -
trunk/mindi/distributions/mandriva/spec.m4
r729 r764 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version} -TTT.tar.bz2')dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 6 define(`DDD', `, which, grep >= 2.5')dnl -
trunk/mindi/distributions/redhat/spec.m4
r729 r764 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version} -TTT.tar.gz')dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.gz')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 6 define(`DDD', `, which, grep >= 2.5')dnl -
trunk/mindi/distributions/suse/spec.m4
r729 r764 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version} -TTT.tar.bz2')dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 6 define(`DDD', `, syslinux')dnl -
trunk/mindi/mindi
r729 r764 284 284 [ "$KBDEPTH" -gt "128" ] && Die "Edit $MINDI_SBIN/mindi and disable FindAndAddUserKeyboardMappingFile (line 2160, approx.)" 285 285 if [ -e "$bigdir/$mappath" ] ; then 286 echo "$mappath already added" >> $LOGFILE287 return286 echo "$mappath already added" >> $LOGFILE 287 return 288 288 elif [ -d "$bigdir/$mappath" ] ; then 289 289 echo "Cannot add $mappath: it's a directory. Sorry." … … 298 298 fi 299 299 else 300 echo -en "`basename $mappath | tr '.' '#' | sed s/#kmap#gz// | sed s/#inc#gz//` " | tr '#' '.'300 echo -en "`basename $mappath | tr '.' '#' | sed s/#kmap#gz// | sed s/#inc#gz//` " | tr '#' '.' 301 301 fi 302 302 … … 610 610 [ ! -e "$KEYDIR" ] && KEYDIR=/usr/share 611 611 if [ ! -e "$KEYDIR" ] ; then 612 LogIt "Keyboard mapping directory not found. I shall use default map at boot-time.\n"613 return 0612 LogIt "Keyboard mapping directory not found. I shall use default map at boot-time.\n" 613 return 0 614 614 fi 615 615 if [ -e "/etc/sysconfig/keyboard" ] ; then 616 echo "Red Hat-style config detected." >> $LOGFILE617 keyfile=/etc/sysconfig/keyboard616 echo "Red Hat-style config detected." >> $LOGFILE 617 keyfile=/etc/sysconfig/keyboard 618 618 elif [ -e "/etc/rc.d/rc.keymap" ] ; then 619 echo "Slackware-style config detected." >> $LOGFILE620 keyfile=/etc/rc.d/rc.keymap619 echo "Slackware-style config detected." >> $LOGFILE 620 keyfile=/etc/rc.d/rc.keymap 621 621 elif [ -e "/etc/rc.config" ] ; then 622 622 echo "Debian-style config detected." >> $LOGFILE 623 keyfile=/etc/rc.config623 keyfile=/etc/rc.config 624 624 elif [ -e "/etc/console/boottime.kmap.gz" ] ; then 625 625 echo "Debian-style config detected." >> $LOGFILE 626 echo -en "Adding the following keyboard mapping tables: "627 mkdir -p $bigdir/tmp628 echo "/etc/console/boottime.kmap.gz" > $bigdir/tmp/KEYMAP-LIVES-HERE629 KBDEPTH=0630 mkdir -p $bigdir/etc/console631 cp /etc/console/boottime.kmap.gz $bigdir/etc/console632 echo -e "$DONE"633 return 0634 else 635 echo -en "Searching for rc.config ..."636 keyfile=`find /etc -name rc.config | head -n1`637 if [ "$keyfile" = "" ] || [ ! -e "$keyfile" ] ; then638 LogIt "Unknown config detected. Default keyboard map will be used.\n"639 return640 else641 echo "Found $keyfile" >> $LOGFILE642 fi626 echo -en "Adding the following keyboard mapping tables: " 627 mkdir -p $bigdir/tmp 628 echo "/etc/console/boottime.kmap.gz" > $bigdir/tmp/KEYMAP-LIVES-HERE 629 KBDEPTH=0 630 mkdir -p $bigdir/etc/console 631 cp /etc/console/boottime.kmap.gz $bigdir/etc/console 632 echo -e "$DONE" 633 return 0 634 else 635 echo -en "Searching for rc.config ..." 636 keyfile=`find /etc -name rc.config | head -n1` 637 if [ "$keyfile" = "" ] || [ ! -e "$keyfile" ] ; then 638 LogIt "Unknown config detected. Default keyboard map will be used.\n" 639 return 640 else 641 echo "Found $keyfile" >> $LOGFILE 642 fi 643 643 fi 644 644 if [ ! -e "$KEYDIR/keymaps" ] ; then … … 650 650 [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'` # Slackware 651 651 echo "locale=$locale" >> $LOGFILE 652 mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep -F " ${locale}." | grep -vx " *#.*"`652 mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep -F "/${locale}." | grep -vx " *#.*"` 653 653 [ ! "$mp" ] && mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep "$locale[^r][^/]" | grep -vx " *#.*"` 654 # If we have multiple keymaps then log it !! 655 echo "$mp" | grep -q " " 656 if [ $? -eq 0 ]; then 657 echo "WARNING: Multiple keymaps found: $mp" | tee -a $LOGFILE 658 echo "The following one will be used" >> $LOGFILE 659 fi 654 660 for i in $mp ; do 655 661 mappath=$i … … 661 667 echo "mappath = $mappath" >> $LOGFILE 662 668 if [ ! -e "$mappath" ] || [ -d "$mappath" ] ; then 663 LogIt "Keyboard mapping file not found. Default keyboard map will be used.\n"664 return669 LogIt "Keyboard mapping file not found. Default keyboard map will be used.\n" 670 return 665 671 fi 666 672 echo -en "Adding the following keyboard mapping tables: " … … 926 932 fi 927 933 cp -f $MONDO_TMP/BOOTLOADER.* $bigdir 2> /dev/null || LogIt "\nMondo v1.2x defaults to LILO as the bootloader, BTW.\n" 928 if [ -e "$MONDO_TMP/ start-nfs" ] ; then934 if [ -e "$MONDO_TMP/NFS-DEV" ] ; then 929 935 LogIt "Incorporating NFS-related settings\n" 930 cp -f $MONDO_TMP/start-nfs $bigdir/sbin || Die "Cannot find start-nfs" 931 for r in NFS-SERVER-MOUNT NFS-SERVER-PATH NFS-DEV NFS-CLIENT-IPADDR NFS-SERVER-IPADDR ; do 932 cp -f $MONDO_TMP/$r $bigdir/tmp || Die "Cannot copy $r - did you run out of disk space?" 933 echo "Copying $r to ramdisk" >> $LOGFILE 936 for r in NFS-* ISO-PREFIX ; do 937 cp -f $MONDO_TMP/$r $bigdir/tmp || Die "Cannot copy $r - did you run out of disk space?" 938 echo "Copying $r to ramdisk" >> $LOGFILE 934 939 done 935 940 fi … … 1122 1127 1123 1128 1124 1125 1129 #ListKernelModules() { 1126 1130 #local output q … … 1140 1144 if [ ! -e "$fname" ] ; then 1141 1145 echo "Warning - $fname does not exist; cannot be LDD'd." >> $LOGFILE 1142 if echo $fname | grep lvm &> /dev/null ; then1143 echo "This warning only affects you if you are using LVM." >> $LOGFILE1144 if lsmod | grep lvm &> /dev/null ; then1145 echo "I think you are, so please take heed!" >> $LOGFILE1146 # LogIt "Where is liblvm? You need it."1147 else1148 echo "I don't think you are, so don't worry about it." >> $LOGFILE1149 fi1150 fi1146 if echo $fname | grep lvm &> /dev/null ; then 1147 echo "This warning only affects you if you are using LVM." >> $LOGFILE 1148 if lsmod | grep lvm &> /dev/null ; then 1149 echo "I think you are, so please take heed!" >> $LOGFILE 1150 # LogIt "Where is liblvm? You need it." 1151 else 1152 echo "I don't think you are, so don't worry about it." >> $LOGFILE 1153 fi 1154 fi 1151 1155 elif [ -h "$fname" ] && [ -x "$fname" ] ; then 1152 echo "$fname is softlink" >> $LOGFILE1156 echo "$fname is softlink" >> $LOGFILE 1153 1157 # echo "$fname will not be LDD'd. It is a softlink to `WhatSoftlinkPointsTo $fname`, which should already be in queue to be analyzed." >> $LOGFILE 1154 1158 # echo "$fname" … … 1377 1381 all_partitions="" 1378 1382 1379 if [ -d "/proc/lvm" ] || [ -d "/dev/mapper" ]; then1383 if [ $LVM != "false" ]; then 1380 1384 echo -en "\rAnalyzing LVM...\r" 1381 1385 all_partitions=`$MINDI_LIB/analyze-my-lvm | grep -F ">>>" | cut -d' ' -f2-32` … … 1387 1391 done 1388 1392 [ "$IMAGE_DEVS" != "" ] && all_partitions="`echo "$all_partitions $IMAGE_DEVS" | tr ' ' '\n' | sort -u | tr '\n ' ' '`" 1389 printf " %-15s %-15s %-15s %-15s \n" DEVICE MOUNTPOINT FORMAT "SIZE (MB)"1393 printf " %-15s %-15s %-15s %-15s %-15s\n" DEVICE MOUNTPOINT FORMAT "SIZE (MB)" LABEL 1390 1394 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" 1391 1395 for c_p in $all_partitions ; do … … 1418 1422 actual_dev="" 1419 1423 1420 # 1st try : blkid, the good way 1424 # 1st try : blkid, the good way for all LABEL 1421 1425 if [ -x "/sbin/blkid" ]; then 1422 actual_dev=`/sbin/blkid | /bin/grep "$current_partition" | /bin/cut -d':' -f1` 1426 actual_dev=`/sbin/blkid | /bin/grep "$redhat_label" | grep LABEL= | /bin/cut -d':' -f1` 1427 # For LVM FS it will give a /dev/dm-# which should then be converted 1428 if [ $LVM = "v2" ] && [ "`echo $actual_dev | grep '/dev/dm'`" ]; then 1429 major=`/bin/ls -l $actual_dev | awk '{print $5}'` 1430 minor=`/bin/ls -l $actual_dev | awk '{print $6}'` 1431 for dev in `ls /dev/mapper/*`; do 1432 major1=`/bin/ls -l $dev | awk '{print $5}'` 1433 minor1=`/bin/ls -l $dev | awk '{print $6}'` 1434 if [ $major1 = $major ] && [ $minor1 = $minor ]; then 1435 actual_dev=`/bin/ls -l $dev | awk '{print $10}'` 1436 break 1437 fi 1438 done 1439 fi 1423 1440 fi 1424 1441 1425 1442 # 2nd try, which works on a standard partition (ext2/3), but not on swap 1443 # For LVM gives a /dev/mapper entry 1426 1444 if [ "x$actual_dev" = "x" ]; then 1427 1445 actual_dev=`/bin/mount -l | /bin/grep "\[$redhat_label\]" | /bin/cut -d' ' -f1` 1428 1446 fi 1429 1447 1430 # 3rd try, with vol_id (which works with swap) 1448 # 3rd try, with vol_id 1449 # SWAP only 1431 1450 if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ]; then 1432 1451 list_swaps=`cat /proc/swaps | /bin/grep "/dev/" | /bin/awk '{ print $1 }' ` … … 1441 1460 1442 1461 # 4th try : pre-formated LABEL. Format is : LABEL=SWAP-mydevice. e.g. : LABEL=SWAP-hda5 1462 # SWAP only 1443 1463 if [ "x$actual_dev" = "x" -a _"`echo $current_partition | /bin/grep -i 'LABEL=SWAP'`" != _"" ]; then 1444 1464 try_dev="`echo "$redhat_label" | /bin/cut -d '-' -f2`" … … 1453 1473 current_partition=$actual_dev 1454 1474 else 1455 Die "Your system uses a labelled swap partition, but you lack the tool to support it.\nPlease replace swaplabels with their correct devices in /etc/fstab or install blkid|vol_id\n"1475 Die "Your system uses a labelled partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in /etc/fstab or install blkid|vol_id\n" 1456 1476 fi 1457 1477 else … … 1459 1479 fi 1460 1480 1461 partition_format=`$AWK '$1 == "'"$str_to_find_fmt_with"'" {print $3}' $MY_FSTAB`1462 # Some distributions such as Debian do not put /dev/<VG>/<LV> in fstab1463 # for LVM partitions but use /dev/mapper/<VG>-<LV> instead. Fortunately,1464 # the former is then a link to the latter, so we test whether1465 # $current_partition is actually such a link or not and set1466 # $current_lvolume accordingly. Note that $current_lvolume may well be an1467 # ordinary device. It is just to make sure that we feed the right value1468 # into any of the LVM tools if possible.1469 if [ -d "/dev/mapper" ] && [ -z "`lvm lvdisplay $current_partition 2> /dev/null`" ]; then1470 partition_stub="`echo "$current_partition" | sed "s|^/dev/mapper/|/dev/|" | cut -d"-" -f1`"1471 current_lvolume="`find /dev -lname "$current_partition" | grep "^$partition_stub"`"1472 fi1473 if [ -z "$current_lvolume" ]; then 1481 partition_format=`$AWK '$1 == "'"$str_to_find_fmt_with"'" {print $3}' $MY_FSTAB` 1482 # Some distributions such as Debian do not put /dev/<VG>/<LV> in fstab 1483 # for LVM partitions but use /dev/mapper/<VG>-<LV> instead. Fortunately, 1484 # the former is then a link to the latter, so we test whether 1485 # $current_partition is actually such a link or not and set 1486 # $current_lvolume accordingly. On Debian you may find more than one answer 1487 # so we remove the one corresponding to /dev/.static 1488 # On RedHat even if the device name is different (/dev/mapper/<VG><LV>), the 1489 # principle is the same and we need to find the link to it as well. 1490 # Note that $current_lvolume may well be an 1491 # ordinary device. It is just to make sure that we feed the right value 1492 # into any of the LVM tools if possible. 1493 1474 1494 current_lvolume="$current_partition" 1475 fi 1476 # End of LVM device style variation code (other than $current_lvolume). 1477 if [ -d "/proc/lvm" ] && [ "`lvdisplay $current_lvolume 2> /dev/null`" ]; then 1478 partition_size="lvm" 1479 elif [ -d "/dev/mapper" ] && [ "`lvm lvdisplay $current_lvolume 2> /dev/null`" ]; then 1480 partition_size="lvm" 1481 else 1482 partition_size=`SizeOfPartition $current_partition` 1483 [ "`echo "$current_partition" | grep "[0-9]"`" = "" ] && continue 1484 [ "`echo "$current_partition" | grep -c "^/"`" -ne "1" ] && continue 1485 if [ "$partition_format" = "swap" ] || [ "$partition_mountpt" = "swap" ] ; then 1486 partition_size=`grep -Fv "Priority" /proc/swaps | tr -s '\t' ' ' | grep -F "$current_partition" | $AWK '{print $3}'` 1487 [ "$partition_mountpt" != "swap" ] && partition_mountpt="swap" 1495 if [ $LVM = "v2" ] && [ "`echo $current_partition | grep -E '^/dev/mapper/'`" ]; then 1496 # .static dir are a Debian specificity 1497 current_lvolume="`find /dev -lname "$current_partition" | grep -Ev '^/dev/\.static/'`" 1498 echo $current_lvolume | grep -q ' ' 1499 if [ $? -eq 0]; then 1500 echo "WARNING: Multiple Logical Volumes found. Report to dev team" >> $LOGFILE 1501 fi 1502 fi 1503 # 1504 # End of LVM device style variation code (other than $current_lvolume). 1505 1506 if [ $LVM != "false" ] && [ "`$LVMCMD lvdisplay $current_lvolume 2> /dev/null`" ]; then 1507 # Size computed via LVM not directly 1508 partition_size="lvm" 1509 else 1510 partition_size=`SizeOfPartition $current_partition` 1511 [ "`echo "$current_partition" | grep "[0-9]"`" = "" ] && continue 1512 [ "`echo "$current_partition" | grep -c "^/"`" -ne "1" ] && continue 1513 if [ "$partition_format" = "swap" ] || [ "$partition_mountpt" = "swap" ] ; then 1514 partition_size=`grep -Fv "Priority" /proc/swaps | tr -s '\t' ' ' | grep -F "$current_partition" | $AWK '{print $3}'` 1515 [ "$partition_mountpt" != "swap" ] && partition_mountpt="swap" 1488 1516 [ "$partition_format" != "swap" ] && partition_format="swap" 1489 if [ "$partition_size" = "" ] ; then 1490 totalsize=0 1491 items=0 1492 for i in `tr -s ' ' '\t' < /proc/swaps | grep -Fv "Filename" | cut -f3` ; do 1493 totalsize=$(($totalsize+$i)) 1494 items=$(($items+1)) 1495 done 1496 [ "$items" -gt "0" ] && partition_size=$(($totalsize/$items)) || partition_size=0 1497 [ "$partition_size" -lt "125000" ] && partition_size=125000 1498 echo "I'm guessing $c_p is $(($partition_size/1024))MB" >> $LOGFILE 1499 fi 1500 fi 1501 fi 1502 [ "$partition_mountpt" = "swap" ] && partition_format="swap" 1503 [ "$partition_format" = "swap" ] && partition_mountpt="swap" 1504 if [ "$partition_mountpt" = "" ] ; then 1505 if [ "`pvdisplay $current_lvolume 2> /dev/null`" != "" ] || [ "`lvm pvdisplay $current_lvolume 2> /dev/null`" != "" ] ; then 1506 if [ "`grep -F device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then 1507 partition_mountpt="raid" 1508 partition_format="raid" 1517 if [ "$partition_size" = "" ] ; then 1518 totalsize=0 1519 items=0 1520 for i in `tr -s ' ' '\t' < /proc/swaps | grep -Fv "Filename" | cut -f3` ; do 1521 totalsize=$(($totalsize+$i)) 1522 items=$(($items+1)) 1523 done 1524 [ "$items" -gt "0" ] && partition_size=$(($totalsize/$items)) || partition_size=0 1525 [ "$partition_size" -lt "125000" ] && partition_size=125000 1526 echo "I'm guessing $c_p is $(($partition_size/1024))MB" >> $LOGFILE 1527 fi 1528 fi 1529 fi 1530 [ "$partition_mountpt" = "swap" ] && partition_format="swap" 1531 [ "$partition_format" = "swap" ] && partition_mountpt="swap" 1532 if [ "$partition_mountpt" = "" ] ; then 1533 if [ "`$LVMCMD pvdisplay $current_lvolume 2> /dev/null`" != "" ] ; then 1534 if [ "`grep -F device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then 1535 partition_mountpt="raid" 1536 partition_format="raid" 1537 else 1538 partition_mountpt="lvm" 1539 partition_format="lvm" 1540 fi 1541 fi 1542 fi 1543 psz=$partition_size 1544 echo "Examining $current_partition (mount=$partition_mountpt fmt=$partition_format psz=$psz)" >> $LOGFILE 1545 [ "$psz" != "lvm" ] && psz=$(($psz/1024)) 1546 if [ "`echo " $IMAGE_DEVS " | grep -F " $current_partition "`" != "" ] ; then 1547 partition_mountpt="image" 1548 old_partition_fmt=$partition_format 1549 # partition_format="`$FDISK -l 2>> $LOGFILE | tr -s '\t' ' ' | grep -w "$absolute_partition" | $AWK 'x=$(NF-1}'`" 1550 partition_format="`$FDISK -l 2>> $LOGFILE | tr '*' ' ' | tr '+' ' ' | tr -s ' ' '\t' | grep -w "$absolute_partition" | cut -f5`" 1551 echo "------- $FDISK -l log ------------" >> $LOGFILE 1552 cat $FDISKLOG >> $LOGFILE 1553 echo "------- $FDISK log end ------------" >> $LOGFILE 1554 partition_size=$(($partition_size+1)); # just in case 1555 if [ "$partition_format" = "Linux" ] ; then 1556 echo "Are you imaging a mounted swap partition? Silly..." >> $LOGFILE 1557 echo "Reverting format from $old_partition_fmt to $partition_format" >> $LOGFILE 1558 partition_format=$old_partition_fmt 1559 fi 1560 fi 1561 if [ "$EXCLUDE_DEVS" ] && [ "`echo " $EXCLUDE_DEVS " | grep -F " $current_partition "`" ] || [ "`echo " $EXCLUDE_DEVS " | grep " $current_partition "`" ] ; then 1562 echo "Excluding $current_partition from mountlist" >> $LOGFILE 1563 continue 1564 fi 1565 if [ ! "$partition_mountpt" ] ; then 1566 for qq in "" `find /dev/ida/c*d* ! -name '*p*'` ; do 1567 partition_format=`$FDISK -l $qq 2>> $LOGFILE | grep -w "$c_p" | sed 's/12/|/' | tr -s '\t' ' ' | cut -d'|' -f2 | cut -d' ' -f2-9` 1568 echo "------- $FDISK -l $qq log ------------" >> $LOGFILE 1569 cat $FDISKLOG >> $LOGFILE 1570 echo "------- $FDISK log end ------------" >> $LOGFILE 1571 [ "$partition_format" ] && break 1572 done 1573 if [ "$partition_format" = "Compaq diagnostics" ] ; then 1574 partition_format="compaq" 1575 elif [ ! "`grep -F device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then 1576 LogIt "Unable to find mountpoint of $current_partition - ignoring\n" 1577 continue 1578 fi 1579 fi 1580 partition_format="`echo "$partition_format" | cut -d',' -f1`"; # in case user has ext3,ext2 or something dumb like that 1581 [ "$partition_format" = "auto" ] && partition_format="`mount | grep -w $current_partition | awk '{print$5;}'`"; # in case user uses 'auto' (dumb!) 1582 unofficial_outstring=`printf "\t%-15s %-15s %-15s %7s\n" $current_partition $partition_mountpt $partition_format $psz` 1583 if [ "$current_partition" = "" ] ; then 1584 echo "Unknown partition (outstring = $unofficial_outstring)" >> $LOGFILE 1585 elif [ "$partition_mountpt" = "" ] && [ -f "/etc/raidtab" ] ; then 1586 if [ "`grep -F device /etc/raidtab 2>/dev/null | grep -F $current_partition`" ] ; then 1587 partition_mountpt=raid 1588 partition_format=raid 1589 printf "\t%-15s %-15s %-15s %7s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label" 1590 printf "%s %s %s %s %s\n" $current_partition $partition_mountpt $partition_format $partition_size "$redhat_label" >> $mountlist 1591 else 1592 echo "Unknown mountpoint (outstring = $unofficial_outstring)" >> $LOGFILE 1593 fi 1594 elif [ "$partition_format" = "" ] ; then 1595 echo "Unknown format (outstring = $unofficial_outstring)" >> $LOGFILE 1596 elif [ "$partition_size" = "" ] ; then 1597 echo "Unknown partition size (outstring = $unofficial_outstring)" >> $LOGFILE 1598 elif [ "$partition_mountpt" = "/proc" ] || [ "$partition_mountpt" = "/dev/pts" ] ; then 1599 continue 1509 1600 else 1510 # lvm_dev="`pvdisplay $current_lvolume | grep -i "VG N" | head -n1 | tr -s ' ' ' ' | cut -d' ' -f3`" 1511 partition_mountpt="lvm" 1512 partition_format="lvm" 1513 fi 1514 fi 1515 fi 1516 psz=$partition_size 1517 echo "Examining $current_partition (mount=$partition_mountpt fmt=$partition_format psz=$psz)" >> $LOGFILE 1518 [ "$psz" != "lvm" ] && psz=$(($psz/1024)) 1519 if [ "`echo " $IMAGE_DEVS " | grep -F " $current_partition "`" != "" ] ; then 1520 partition_mountpt="image" 1521 old_partition_fmt=$partition_format 1522 # partition_format="`$FDISK -l 2>> $LOGFILE | tr -s '\t' ' ' | grep -w "$absolute_partition" | $AWK 'x=$(NF-1}'`" 1523 partition_format="`$FDISK -l 2>> $LOGFILE | tr '*' ' ' | tr '+' ' ' | tr -s ' ' '\t' | grep -w "$absolute_partition" | cut -f5`" 1524 echo "------- $FDISK -l log ------------" >> $LOGFILE 1525 cat $FDISKLOG >> $LOGFILE 1526 echo "------- $FDISK log end ------------" >> $LOGFILE 1527 partition_size=$(($partition_size+1)); # just in case 1528 if [ "$partition_format" = "Linux" ] ; then 1529 echo "Are you imaging a mounted swap partition? Silly..." >> $LOGFILE 1530 echo "Reverting format from $old_partition_fmt to $partition_format" >> $LOGFILE 1531 partition_format=$old_partition_fmt 1532 fi 1533 fi 1534 if [ "$EXCLUDE_DEVS" ] && [ "`echo " $EXCLUDE_DEVS " | grep -F " $current_partition "`" ] || [ "`echo " $EXCLUDE_DEVS " | grep " $current_partition "`" ] ; then 1535 echo "Excluding $current_partition from mountlist" >> $LOGFILE 1536 continue 1537 fi 1538 if [ ! "$partition_mountpt" ] ; then 1539 for qq in "" `find /dev/ida/c*d* ! -name '*p*'` ; do 1540 partition_format=`$FDISK -l $qq 2>> $LOGFILE | grep -w "$c_p" | sed 's/12/|/' | tr -s '\t' ' ' | cut -d'|' -f2 | cut -d' ' -f2-9` 1541 echo "------- $FDISK -l $qq log ------------" >> $LOGFILE 1542 cat $FDISKLOG >> $LOGFILE 1543 echo "------- $FDISK log end ------------" >> $LOGFILE 1544 [ "$partition_format" ] && break 1545 done 1546 if [ "$partition_format" = "Compaq diagnostics" ] ; then 1547 partition_format="compaq" 1548 elif [ ! "`grep -F device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then 1549 LogIt "Unable to find mountpoint of $current_partition - ignoring\n" 1550 continue 1551 fi 1552 fi 1553 partition_format="`echo "$partition_format" | cut -d',' -f1`"; # in case user has ext3,ext2 or something dumb like that 1554 [ "$partition_format" = "auto" ] && partition_format="`mount | grep -w $current_partition | awk '{print$5;}'`"; # in case user uses 'auto' (dumb!) 1555 unofficial_outstring=`printf "\t%-15s %-15s %-15s %7s\n" $current_partition $partition_mountpt $partition_format $psz` 1556 if [ "$current_partition" = "" ] ; then 1557 echo "Unknown partition (outstring = $unofficial_outstring)" >> $LOGFILE 1558 elif [ "$partition_mountpt" = "" ] && [ -f "/etc/raidtab" ] ; then 1559 if [ "`grep -F device /etc/raidtab 2>/dev/null | grep -F $current_partition`" ] ; then 1560 partition_mountpt=raid 1561 partition_format=raid 1562 printf "\t%-15s %-15s %-15s %7s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label" 1601 if [ "$partition_format" = "dos" ] || [ "$partition_format" = "msdos" ] ; then 1602 echo "Stupid bastard..." >> $LOGFILE 1603 partition_format="vfat" 1604 fi 1605 printf "\t%-15s %-15s %-15s %7s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label" 1563 1606 printf "%s %s %s %s %s\n" $current_partition $partition_mountpt $partition_format $partition_size "$redhat_label" >> $mountlist 1564 else 1565 echo "Unknown mountpoint (outstring = $unofficial_outstring)" >> $LOGFILE 1566 fi 1567 elif [ "$partition_format" = "" ] ; then 1568 echo "Unknown format (outstring = $unofficial_outstring)" >> $LOGFILE 1569 elif [ "$partition_size" = "" ] ; then 1570 echo "Unknown partition size (outstring = $unofficial_outstring)" >> $LOGFILE 1571 elif [ "$partition_mountpt" = "/proc" ] || [ "$partition_mountpt" = "/dev/pts" ] ; then 1572 continue 1573 else 1574 if [ "$partition_format" = "dos" ] || [ "$partition_format" = "msdos" ] ; then 1575 echo "Stupid bastard..." >> $LOGFILE 1576 partition_format="vfat" 1577 fi 1578 printf "\t%-15s %-15s %-15s %7s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label" 1579 printf "%s %s %s %s %s\n" $current_partition $partition_mountpt $partition_format $partition_size "$redhat_label" >> $mountlist 1580 fi 1607 fi 1581 1608 done 1582 1609 } … … 1611 1638 rm -f $1.tmp 1612 1639 if [ "$CDRECOVERY" != "yes" ] ; then 1613 if [ -e "$MONDO_TMP/ start-nfs" ] ; then1640 if [ -e "$MONDO_TMP/NFS-DEV" ] ; then 1614 1641 echo -en "Press <enter> to continue.\n" >> $1 1615 1642 elif [ ! "$MONDO_TMP" ] ; then … … 1694 1721 cd $TMP_ROOT/iso/isolinux 1695 1722 cat $iso_cfg_file | HackSyslinuxFile $ramdisk_size $TMP_ROOT/iso > isolinux.cfg || Die "Cannot copy isolinux.cfg from mindi_home to tmp_root - did you run out of disk space?" 1696 if [ -e "$MONDO_TMP/ start-nfs" ] ; then1697 mv isolinux.cfg isolinux.cfg.old1698 sed s/interactive/iso/ isolinux.cfg.old > isolinux.cfg1723 if [ -e "$MONDO_TMP/NFS-DEV" ] ; then 1724 mv isolinux.cfg isolinux.cfg.old 1725 sed s/interactive/iso/ isolinux.cfg.old > isolinux.cfg 1699 1726 fi 1700 1727 if [ "$ARCH" != "ia64" ] ; then 1701 1728 cp $ISOLINUX isolinux.bin || Die "Cannot copy isolinux.bin ($ISOLINUX) to tmp_root - did you run out of disk space?" 1702 cp $ISOLINUX ../1729 cp $ISOLINUX ../ 1703 1730 fi 1704 1731 cd $TMP_ROOT/iso … … 1708 1735 [ "$MONDO_SHARE" ] && cp -f $MONDO_SHARE/autorun . 1709 1736 if [ -d "/home/MondoCD" ] ; then 1710 cp -pRdu /home/MondoCD/* .1737 cp -pRdu /home/MondoCD/* . 1711 1738 fi 1712 1739 if [ "$ARCH" != "ia64" ] ; then … … 1748 1775 if [ "`DidMondoCallMe`" ] ; then 1749 1776 if [ "$CDRECOVERY" != "yes" ] ; then 1750 if [ -e "$MONDO_TMP/ start-nfs" ] ; then1777 if [ -e "$MONDO_TMP/NFS-DEV" ] ; then 1751 1778 echo -en "Press <enter> to continue.\n" 1752 1779 elif [ ! "$MONDO_TMP" ] ; then … … 1856 1883 echo -en "default=RESTORE\n" 1857 1884 elif [ "$disksize" -gt "2880" ] && [ "`DidMondoCallMe`" ] ; then 1858 if [ -e "$MONDO_TMP/ start-nfs" ] ; then1885 if [ -e "$MONDO_TMP/NFS-DEV" ] ; then 1859 1886 echo -en "default=iso\n" 1860 1887 else … … 1877 1904 elif [ "$disksize" -gt "2880" ] ; then 1878 1905 if [ "`DidMondoCallMe`" ] ; then 1879 if [ -e "$MONDO_TMP/ start-nfs" ] ; then1906 if [ -e "$MONDO_TMP/NFS-DEV" ] ; then 1880 1907 options="iso" 1881 1908 else … … 2103 2130 # tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz\n" <--- present for LILO; is it nec. for SYSLINUX too? 2104 2131 cat $sys_cfg_file | HackSyslinuxFile $ramdisk_size $mountpoint > syslinux.cfg || Die "Cannot copy syslinux.cfg from mindi_home to tmp_root" 2105 if [ -e "$MONDO_TMP/ start-nfs" ] ; then2132 if [ -e "$MONDO_TMP/NFS-DEV" ] ; then 2106 2133 mv syslinux.cfg syslinux.cfg.orig 2107 2134 sed s/interactive/iso/ syslinux.cfg.orig > syslinux.cfg … … 2292 2319 cp -f $TMP_ROOT/mountlist.txt $CACHE_LOC 2293 2320 [ "`DidMondoCallMe`" ] && cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MONDO_TMP/. 2294 [ -d "/proc/lvm" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm 2295 [ -d "/dev/mapper" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm 2321 [ $LVM != "false" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm 2296 2322 cat $minidir_root/$noof_disks/tmp/mountlist.txt >> $LOGFILE 2297 2323 ZipMinidirsIntoTarballs $minidir_root $tardir $noof_disks … … 2840 2866 list_of_groovy_mods="$CDROM_MODS `WhichOfTheseModulesAreLoaded "$SCSI_MODS"`" 2841 2867 fi 2842 if [ -e "$MONDO_TMP/start-nfs" ] ; then 2843 cp -a $MONDO_TMP/start-nfs $mountpoint/sbin 2868 if [ -e "$MONDO_TMP/NFS-DEV" ] ; then 2844 2869 # For PXE boot 2845 2870 list_of_groovy_mods="$list_of_groovy_mods $NET_MODS" … … 3044 3069 mkdir -p $MONDO_ROOT 3045 3070 3071 if [ -d "/proc/lvm" ]; then 3072 # LVM v1 3073 LVMCMD="" 3074 LVM="v1" 3075 elif [ -d "/dev/mapper" ]; then 3076 # LVM v2 3077 LVMCMD="lvm" 3078 LVM="v2" 3079 else 3080 LVM="false" 3081 fi 3082 3046 3083 if [ "$#" -ge "2" ] ; then 3047 3084 if [ "$1" = "--max-compressed-size" ] ; then -
trunk/mindi/rootfs/sbin/LogIt
r30 r764 1 1 #!/bin/sh 2 # 3 # $Id$ 4 # 2 5 3 6 # if [ ! -e "/bin/date" ] ; then … … 8 11 currdate="" 9 12 10 LOGFILE=/tmp/mondo-restore.log 11 if [ ! -e "/tmp/mondo-restore.log" ] ; then 12 echo "...first line..." > /tmp/mondo-restore.log 13 fi 14 # mkdir -p /var/log 15 # ln -s -f /tmp/mondo-restore.log /var/log/mondo-restore.log 13 LOGFILE=/tmp/mondo-restore.log 14 if [ ! -e "$LOGFILE" ] ; then 15 echo "...first line..." > $LOGFILE 16 fi 16 17 17 18 # LogIt $phrase ------ log only -
trunk/mindi/rootfs/sbin/init
r649 r764 1 1 #!/bin/sh 2 2 # 3 # 04/20/2005 4 # - fix for 'skip the tape datadisks' bug (Joseph Smith) 3 # $Id$ 5 4 # 6 # 10/13/2004 7 # - echo 0 > /proc/sys/kernel/exec-shield to disable exec-shield 8 # 9 # 07/25 10 # - removed sbminst 11 # 12 # 06/25 13 # - klogd -c 2 (was -c 5) 14 # 15 # 06/21 16 # - experimented w/ calling ctrlaltdel to setup soft reset 17 # - don't softlink /var/log 18 # 19 # 06/16 20 # - insmod dm_mod as well as dm-mod 21 # 22 # 05/24 23 # - added Andree's vc.tgz 24 # 25 # 05/14 26 # - open => openvt (part of busybox) 27 # - nash removed. dm.tgz added 28 # 29 # 04/21 30 # - compare original lsmod output w/ new lsmod output 31 # 32 # 04/13 33 # - mount /sys if appropriate 34 # 35 # 04/03 36 # - use 'dd if=$tapedev bs=32k count=1024' instead of 'tar -zxf $tapedev' 37 # to extract aux datadisk files from tape 38 # 39 # 25/03 40 # - wait 7s, not 2s, while installing modules 41 # 42 # 18/01/2004 43 # - logging mondo-restore.cfg, not mondo-restore.log --- FIXED 44 # 45 # 11/23/2003 46 # - if find-and-mount-cdrom fails once, try again 47 # - open scrolling log of /tmp/mondo-restore.log later than previously 48 # 49 # 11/18 50 # - disabled clear()'s 51 # - reboot at end 52 # 53 # 11/15 54 # - softlink /var/log to /tmp/tmpfs/var/log 55 # - klogd -c 5 now (was -c 1) 56 # 57 # 11/10 58 # - don't call mondorestore if backup-media-type is not specified in 59 # config file /tmp/mondo-restore.cfg 60 # 61 # 10/21 62 # - softlink nano to pico if nano found 63 # 64 # 10/16 65 # - create /dev/md/* softlinks if necessary 66 # 67 # 10/12 68 # - start devfs if /tmp/USE-DEVFS found 69 # - create simple /etc/devfsd.conf file 70 # 71 # 10/09 72 # - try various mount commands to get tmpfs online (use initiative) 73 # 74 # 09/24 75 # - also try /dev/st0, /dev/osst0, /dev/ht0 if [tapedev] fails 76 # - modify media-dev in mondo-restore.cfg if we succeed :) 77 # 78 # 09/15 79 # - create /tmp/null and /tmp/stdout and /tmp/stderr 80 # as copies of the real thing, just in case partimagehack 81 # still uses them 82 # 83 # 08/01 84 # - tmpfs ramdisk is now 48m 85 # 86 # 07/14 87 # - added mkdirs at start 88 # 89 # 06/04 90 # - remount root as rw just in case 91 # 92 # 05/04 93 # - replaced /mnt/groovy-stuff with $GROOVY 94 # 95 # 04/30 96 # - if your CD was created by Mondoarchive when it backed up 97 # to ISO(s) then re-jig tmp/mondo-restore.cfg accordingly; 98 # this is nec. if you backup to a hard disk directory but 99 # then burn the ISOs to physical CDs 100 # 101 # 04/26 102 # - offer user the chance to specify another tape device, if 103 # the one they specified at backup-time refuses to act as 104 # aux data disk at boot-time 105 # 106 # 04/21 107 # - start scsi if cciss 108 # - use ataraid.tgz too 109 # 110 # 05/03 111 # - mount / -o rw,remount at end, just in case 112 # RH9 futzes with the mountpoint 113 # 114 # 04/04 115 # - increased tmpfs ramdisk size from 34m to 38m 116 # 117 # 01/01 - 01/31/2003 118 # - fixed issue with LVM and SW Raid devices (Brian Borgeson) 119 # - friendlier 'upgrade your ram' msg 120 # - better fallback msg 121 # - if /tmp/2880.siz exists then assume boot CD 122 # 123 # 11/01 - 12/31/2002 124 # - updated intro msg 125 # - if /dev/boot_device and /BOOTLOADER.DEVICE exist then 126 # copy device /dev/boot_device to pathname contained 127 # in /BOOTLOADER.DEVICE text file 128 # 129 # 04/01 - 08/31/2002 130 # - handle new 'backup_media_type' entry in mondo-restore.cfg 131 # - added 'sleep 2' at start of WelcomeMessage 132 # - disabled a silly 'abort' line at end 133 # - better handling of devfs (DuckX) --- new RunDevfsd() 134 # - assume start-nfs is in /sbin 135 # - extract rd.tgz, raw.tgz, ida.tgz, cciss.tgz to /; they include 136 # /dev entries which would otherwise fill up the ramdisk at bkp-time 137 # 138 # 01/01 - 03/31/2002 139 # - Carl Wilhelm Soderstrom disabled exec sh; replaced with exit 1 140 # - if you are an idiot & your computer has very little RAM, 141 # this script will no longer abort; it will merely warn you 142 # - run chmod 755 `which start-nfs` before running start-nfs 143 # - use a ramdisk for /tmp (after copying old /tmp stuff into it) 144 # - fixed segfaults ('open') by replacing 'sh' call with '/bin/sh' call 145 # - changed LaunchTerminals() to try to work with newly-compiled 'open' 146 # - don't write 'start-nfs error' if start-nfs doesn't exist; just go on 147 # - added tmpfs and some space-checking 148 # - cleaned up script 149 # - added stuff to start NFS services if necessary 150 # - reordered some of the main() stuff, for elegance's sake 151 # - added Petris and 'tail -f /tmp/mondo-restore.log' to LaunchTerminals() 152 # - changed /usr/share/ to /usr/local/ 153 # 154 # 2001 155 # - fix some typos 156 # - added lots of cool stuff to make Mindi _nearly_ boot from tape 157 # - restructured the welcome msg echoed to screen 158 # - broke up spaghetti code; made lots of subroutines 159 # 5 # init script launched during the restore process 160 6 #------------------------------------------------------------ 161 7 … … 232 78 openvt 6 /bin/sh 233 79 openvt 7 /bin/sh /sbin/wait-for-petris 234 # openvt 8 /usr/bin/tail -f /tmp/mondo-restore.log235 80 } 236 81 … … 385 230 LogIt "Devfs found. Testing kernel support..." 386 231 if [ ! -e "/dev/.devfsd" ] ; then 387 mount -t devfs devfs /dev 2>> /tmp/mondo-restore.log232 mount -t devfs devfs /dev 2>> $LOGFILE 388 233 if [ "$?" -ne "0" ] ; then 389 234 LogIt "Error while trying to mount devfs" … … 441 286 if [ -e "/tmp/i-want-my-lvm" ] ; then 442 287 LogIt "Scanning LVM's..." 1 443 if which lvm ; then444 MyInsmod dm-mod445 MyInsmod dm_mod446 lvm vgscan --mknodes447 else448 vgscan449 fi450 grep -E "^#.*vgchange" /tmp/i-want-my-lvm | sed s/#//> /tmp/start-lvm288 if which lvm ; then 289 MyInsmod dm-mod 290 MyInsmod dm_mod 291 lvm vgscan --mknodes 292 else 293 vgscan 294 fi 295 grep -E "^#.*vgchange" /tmp/i-want-my-lvm | sed "s/^#[ ]*//" > /tmp/start-lvm 451 296 chmod +x /tmp/start-lvm 452 297 echo -en "Starting LVM's..." … … 461 306 # pipe vgscan's output, strip it, run 'vgchange' on its output, etc.etc. 462 307 LogIt "LVM's have been started." 463 }464 465 466 467 StartNfs() {468 # using mount -o nolock avoids portmap requirement469 #if which portmap > /dev/null 2> /dev/null ; then470 #LogIt "Running portmap"471 #portmap472 #[ "$?" -eq "0" ] && LogIt "Portmap started OK" || LogIt "Portmap error"473 if [ -e "/sbin/start-nfs" ] ; then474 chmod 755 /sbin/start-nfs475 LogIt "Starting NFS..."476 /sbin/start-nfs477 fi478 #fi479 308 } 480 309 … … 539 368 mount_cmd="mount /dev/shm -t tmpfs -o size=$size" ; # was 34m until 04/2003 540 369 LogIt "Trying '$mount_cmd'" 541 $mount_cmd /tmp/tmpfs 2>> / tmp/mondo-restore.log370 $mount_cmd /tmp/tmpfs 2>> /$LOGFILE 542 371 res=$? 543 372 [ "$res" -eq "0" ] && break … … 635 464 fi 636 465 637 #if [ -e "/tmp/2880.siz" ] ; then638 # HandleCDROMorFloppies639 #el640 466 if [ "`grep -i 'tape ' /tmp/mondo-restore.cfg`" ] || [ "`grep -i udev /tmp/mondo-restore.cfg`" ] ; then 641 467 HandleTape 642 468 ExtractDataDisksAndLoadModules 643 elif [ -e "/sbin/start-nfs" ] && [ "`grep -i pxe /proc/cmdline`" ]; then 644 StartNfs 645 imgname=`grep iso-prefix /tmp/mondo-restore.cfg | cut -d' ' -f2-` 646 if [ "$imgname" = "" ]; then 647 imgname="mondorescue" 648 fi 649 if [ "`grep -i prefix /proc/cmdline`" ] ; then 650 for i in `cat /proc/cmdline` ; do 651 if [ "`echo $i | grep -i prefix`" ] ; then 652 imgname=`echo $i | cut -d'=' -f2` 653 fi 654 done 655 fi 656 dirimg=`grep nfs-server-path /tmp/mondo-restore.cfg | cut -d' ' -f2-` 657 if [ "$dirimg" = "" ]; then 658 dirimg="/" 659 fi 660 LogIt "Mounting NFS image $imgname-1.iso in $dirimg on /mnt/cdrom in loopback" 661 losetup /dev/loop7 /tmp/isodir/$dirimg/$imgname-1.iso 662 mount -o ro -t iso9660 /dev/loop7 /mnt/cdrom 469 elif [ "`grep -i pxe /proc/cmdline`" ]; then 470 /sbin/start-nfs 471 663 472 # Simulate a local CD 664 473 echo "/mnt/cdrom" > /tmp/CDROM-LIVES-HERE 665 474 CD_MOUNTED_OK=yes 666 475 ExtractDataDisksAndLoadModules 667 476 else 668 477 HandleCDROMorFloppies 669 478 ExtractDataDisksAndLoadModules 670 if [ -e "/sbin/start-nfs" ]; then 671 StartNfs 672 fi 479 /sbin/start-nfs 673 480 fi 674 481 res=$? … … 710 517 fi 711 518 hack-cfg-if-necessary || LogIt "Cannot find hack-cfg-if-necessary" 712 openvt 8 /usr/bin/tail -f /tmp/mondo-restore.log519 openvt 8 /usr/bin/tail -f $LOGFILE 713 520 714 521 #------------------------------- -
trunk/mindi/rootfs/sbin/post-init
r274 r764 72 72 else 73 73 if [ "$iso$nuke$compare$interactive" != "" ] ; then 74 LogIt "FYI, this CD was made by Mindi, not Mondo." 1 75 exit 0 76 74 LogIt "FYI, this CD was made by Mindi, not Mondo." 1 75 exit 0 77 76 else 78 LogIt "Mindi-Linux has finished booting."77 LogIt "Mindi-Linux has finished booting." 79 78 fi 80 79 fi -
trunk/mondo-doc/distributions/debian/control
r588 r764 1 Source: mondo 1 Source: mondo-doc 2 2 Section: utils 3 3 Priority: optional 4 Maintainer: Bruno Cornec <bruno@mondorescue >4 Maintainer: Bruno Cornec <bruno@mondorescue.org> 5 5 Build-Depends: debhelper (>= 4.2.20) 6 6 Standards-Version: 3.6.1 -
trunk/mondo-doc/distributions/debian/mondo-doc.doc-base
r588 r764 1 Document: mondo 1 Document: mondo-doc 2 2 Title: Mondo Rescue and Mindi Linux HOWTO 3 3 Author: Hugo Rabson, Mikael Hultgren, Stan Benoit ("Troff"), Randy Delfs, -
trunk/mondo-doc/distributions/debian/rules
r588 r764 23 23 24 24 # Build architecture independent 25 build-indep: build-indep-stamp 26 # Nothing to do, the only indep item is the manual which is available as html in original source 25 build-indep: 26 $(MAKE) -f Makefile.man VERSION=VVV 27 $(MAKE) -f Makefile.howto VERSION=VVV 27 28 touch build-indep-stamp 28 29 … … 54 55 dh_testroot 55 56 dh_clean -k -i 56 dh_installdirs -i57 dh_install -i57 $(MAKE) -f Makefile.man install INSTALLDIR=$(CURDIR)/debian/$(PACKAGE_NAME)/usr/share/doc/$(PACKAGE_NAME) 58 $(MAKE) -f Makefile.howto install INSTALLDIR=$(CURDIR)/debian/$(PACKAGE_NAME)/usr/share/doc/$(PACKAGE_NAME) 58 59 59 60 # Must not depend on anything. This is to be called by -
trunk/mondo-doc/distributions/gentoo/mondo.ebuild
r588 r764 9 9 DESCRIPTION="The premier GPL disaster recovery solution." 10 10 HOMEPAGE="http://www.mondorescue.org" 11 SRC_URI="ftp://ftp.mondore cue.org/src/${PN/-rescue/}-${PV}.tgz"11 SRC_URI="ftp://ftp.mondorescue.org/src/${PN/-rescue/}-${PV}.tgz" 12 12 13 13 LICENSE="GPL-2" -
trunk/mondo-doc/distributions/mandriva/spec.m4
r729 r764 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version} -TTT.tar.bz2')dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 6 define(`DDD', )dnl -
trunk/mondo-doc/distributions/redhat/spec.m4
r729 r764 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version} -TTT.tar.gz')dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.gz')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 6 define(`DDD', )dnl -
trunk/mondo-doc/distributions/rpm/mondo-doc.spec
r729 r764 32 32 %install 33 33 %{__rm} -rf $RPM_BUILD_ROOT 34 %{__make} -f Makefile.man install INSTALLDIR=${RPM_BUILD_ROOT}/ ${RPM_DOC_DIR}/%{name}-%{version}35 %{__make} -f Makefile.howto install INSTALLDIR=${RPM_BUILD_ROOT}/ ${RPM_DOC_DIR}/%{name}-%{version}34 %{__make} -f Makefile.man install INSTALLDIR=${RPM_BUILD_ROOT}/%{_defaultdocdir}/%{name}-%{version} 35 %{__make} -f Makefile.howto install INSTALLDIR=${RPM_BUILD_ROOT}/%{_defaultdocdir}/%{name}-%{version} 36 36 37 37 %clean … … 40 40 %files 41 41 %defattr(-,root,root) 42 %doc svn.log 43 %doc mindi.8 mondoarchive.8 mondorestore.8 44 %doc mindi.8.html mindi.8.txt mindi.8.ps mindi.8.pdf 45 %doc mondoarchive.8.html mondoarchive.8.txt mondoarchive.8.ps mondoarchive.8.pdf 46 %doc mondorestore.8.html mondorestore.8.txt mondorestore.8.ps mondorestore.8.pdf 47 %doc mondorescue-howto.html mondorescue-howto.pdf mondorescue-howto.ps mondorescue-howto.rtf mondorescue-howto.txt mondorescue-howto/ images/ 42 %doc %{_defaultdocdir}/%{name}-%{version} 48 43 49 44 %changelog -
trunk/mondo-doc/distributions/suse/spec.m4
r729 r764 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version} -TTT.tar.bz2')dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 6 define(`DDD', `, buffer, cdrecord')dnl -
trunk/mondo-doc/mindi.8
r402 r764 177 177 .SH AUTHORS 178 178 Bruno Cornec (lead-development) 179 .I "bcornec_at_ users.berlios.de"179 .I "bcornec_at_mondorescue.org" 180 180 .br 181 181 Andree Leidenfrost (co-developper) -
trunk/mondo-doc/mondorescue-howto.sgml
r729 r764 1139 1139 1140 1140 # mindi 1141 Mindi Linux mini-distro generator v1.0 6-r3431142 1143 Latest Mindi is available from http:// mondorescue.berlios.de1141 Mindi Linux mini-distro generator v1.09-r762 1142 1143 Latest Mindi is available from http://www.mondorescueg 1144 1144 1145 1145 BusyBox sources are available from http://www.busybox.net -
trunk/mondo/ChangeLog
r729 r764 8 8 - Internationalization (A huge thank to rene-marc dolhen <rmd_at_mecreant.org> who achieved that big task) 9 9 10 2.0.9 (2006-07-30) 10 2.0.9 (2006-08-04) 11 - Preliminary build process working for Debian and Gentoo (Bruno Cornec) 12 - New NFS/PXE support. start-nfs is now a fixed script. Allow more possibilities at restore time (Bruno Cornec) 13 - Fix some compiler warnings for 64bits mode (Andree Leidenfrost) 11 14 - Fix various screen corruption for 'Configure LVM'/RAID sync (Andree Leidenfrost) 12 15 - SuSE RPMS now use bzip2 (Lars Rupp/Bruno Cornec) 13 - Exclude mvfs type of filesystem (ClearCase) from mondo backup (Bruno Cornec)16 - Exclude ClearCase mvfs type of filesystem from mondo backup (rzonum_at_gmail.com/Bruno Cornec) 14 17 - Improved .spec Requires (Fedora/SuSE feedbacks) (Bruno Cornec) 18 - Indication for users of IDE burners and 2.6 kernels (Christopher Moriarity/Bruno Cornec) 19 - remove df -P during restore as busybox doesn't support it (Bruno Cornec) 15 20 - nfsmount option added to allow redeployment from another NFS server (Bruno Cornec) 21 - This version should work a bit better with files having special char bug #7421 - but more to come (Bruno Cornec) 22 - Fix Debian Bug #369321 by increasing MAX_TAPECATALOG_ENTRIES to 8192 and bkpinfo->optimal_set_size to 16MB (Andree Leidenfrost) 23 - Fix problem with BurnProof+DVD (Andree Leidenfrost) 24 - Fix bug #7820: mondo should now support files > 2GB (taps23_at_yahoo.com/Bruno Cornec) 16 25 - Replaced all occurrences of egrep with 'grep -E' and of fgrep with 'grep -F' (Andree Leidenfrost) 17 26 - Optimize grep usage - fixes Debian bug #222052 (Andree Leidenfrost) -
trunk/mondo/README
r270 r764 28 28 29 29 You can get the latest packages from 30 http://developer.berlios.de/project/showfiles.php?group_id=2524. 30 ftp://ftp.mondorescue.org 31 31 32 32 Please see file 'INSTALL' for instructions about how to build and install … … 50 50 51 51 Apart from the above-mentioned documentation, there is a Wiki with growing 52 contents at the following URL: http:// developer.berlios.de/wiki/?group_id=2524.52 contents at the following URL: http://www.mondorescue.org/cgi-bin/trac.cgi/wiki 53 53 54 54 Also, there is a mailing list mondo-devel@lists.sourceforge.net. Please go to -
trunk/mondo/distributions/gentoo/mondo.ebuild
r588 r764 9 9 DESCRIPTION="The premier GPL disaster recovery solution." 10 10 HOMEPAGE="http://www.mondorescue.org" 11 SRC_URI="ftp://ftp.mondore cue.org/src/${PN/-rescue/}-${PV}-${PR}.tgz"11 SRC_URI="ftp://ftp.mondorescue.org/src/${PN/-rescue/}-${PV}.tar.gz" 12 12 13 13 LICENSE="GPL-2" … … 29 29 >=sys-boot/syslinux-1.52" 30 30 31 S=${WORKDIR}/${PN/-rescue/}-${PV} -${PR}31 S=${WORKDIR}/${PN/-rescue/}-${PV} 32 32 33 33 src_unpack() { -
trunk/mondo/distributions/mandriva/spec.m4
r729 r764 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version} -TTT.tar.bz2')dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 6 define(`DDD', )dnl -
trunk/mondo/distributions/redhat/spec.m4
r729 r764 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version} -TTT.tar.gz')dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.gz')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 6 define(`DDD', )dnl -
trunk/mondo/distributions/rpm/mondo.spec
r729 r764 3 3 # 4 4 5 %define addreq mindi >= 1.0. 7, bzip2 >= 0.9, afio, mkisofs, binutils, newt >= 0.50, DDD5 %define addreq mindi >= 1.0.9, bzip2 >= 0.9, afio, mkisofs, binutils, newt >= 0.50, DDD 6 6 7 7 Summary: A program which a Linux user can utilize to create a rescue/restore CD/tape -
trunk/mondo/distributions/suse/spec.m4
r729 r764 2 2 dnl 3 3 dnl SSS is replaced by the source package format 4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version} -TTT.tar.bz2')dnl4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl 5 5 dnl DDD is replaced by the list of dependencies specific to that distro 6 6 define(`DDD', `, buffer, cdrecord')dnl -
trunk/mondo/mondo/Makefile.am
r729 r764 4 4 pkgdata_DATA = do-not-compress-these 5 5 scriptdir = $(pkgdatadir) 6 script_DATA = autorun 7 8 install-data-hook: 9 @for prog in $(script_DATA); do \ 10 chmod +x $(scriptdir)/$$prog; \ 11 done 6 script_SCRIPTS = autorun -
trunk/mondo/mondo/common/libmondo-files.c
r689 r764 1058 1058 1059 1059 /*@ buffers ******** */ 1060 char *outfile = NULL;1061 1060 char *nfs_dev = NULL; 1062 1061 char *nfs_mount = NULL; … … 1071 1070 /*@ pointers ***** */ 1072 1071 char *p; 1073 FILE *fout;1074 1075 1076 1072 1077 1073 log_it("Storing NFS configuration"); … … 1123 1119 ("Unable to find ethN (eth0, eth1, ...) adapter via NFS mount you specified."); 1124 1120 } 1125 asprintf(&outfile, "%s/start-nfs", bkpinfo->tmpdir);1126 asprintf(&tmp, "outfile = %s", outfile);1127 log_it(tmp);1128 paranoid_free(tmp);1129 1130 if (!(fout = fopen(outfile, "w"))) {1131 fatal_error("Cannot store NFS config");1132 }1133 fprintf(fout, "#!/bin/sh\n");1134 fprintf(fout, "# number of ping\n");1135 fprintf(fout, "ipcount=3\n");1136 fprintf(fout, "for i in `cat /proc/cmdline` ; do\n");1137 fprintf(fout, " echo $i | grep -qi ping= && ipcount=`echo $i | cut -d= -f2`\n");1138 fprintf(fout, "done\n");1139 fprintf(fout, "ifconfig lo 127.0.0.1 # config loopback\n");1140 fprintf(fout, "ipdev=%s\n", nfs_dev);1141 fprintf(fout, "ipaddress=%s\n", nfs_client_ipaddr);1142 fprintf(fout, "ipnetmask=%s\n", nfs_client_netmask);1143 fprintf(fout, "ipbroadcast=%s\n", nfs_client_broadcast);1144 fprintf(fout, "ipgateway=%s\n", nfs_client_defgw);1145 fprintf(fout, "ipconf=\n");1146 fprintf(fout, "nfsmount=%s\n", bkpinfo->nfs_mount);1147 fprintf(fout, "for i in `cat /proc/cmdline` ; do\n");1148 fprintf(fout, " echo $i | grep -qi ipconf= && ipconf=`echo $i | cut -d= -f2`\n");1149 fprintf(fout, " echo $i | grep -qi nfsmount= && nfsmount=`echo $i | cut -d= -f2`\n");1150 fprintf(fout, "done\n");1151 fprintf(fout, "nfs_server_ipaddr=`echo $nfsmount | cut -d: -f1`\n");1152 fprintf(fout, "echo \"$ipconf\" | grep -q \"dhcp\"\n");1153 fprintf(fout, "if [ $? -eq 0 ]; then\n");1154 fprintf(fout, " ipdev=`echo $ipconf | cut -d: -f1`\n");1155 fprintf(fout, " echo \"Making DHCP request on $ipdev\"\n");1156 fprintf(fout, " udhcpc -i $ipdev\n");1157 fprintf(fout, "else\n");1158 fprintf(fout, " if [ \"$ipconf\" != \"\" ]; then\n");1159 fprintf(fout, " ipdev=`echo $ipconf | cut -d: -f1`\n");1160 fprintf(fout, " ipaddress=`echo $ipconf | cut -d: -f2`\n");1161 fprintf(fout, " ipnetmask=`echo $ipconf | cut -d: -f3`\n");1162 fprintf(fout, " ipbroadcast=`echo $ipconf | cut -d: -f4`\n");1163 fprintf(fout, " ipgateway=`echo $ipconf | cut -d: -f5`\n");1164 fprintf(fout, " fi\n");1165 fprintf(fout, " ifconfig $ipdev $ipaddress netmask $ipnetmask broadcast $ipbroadcast\n");1166 fprintf(fout, " route add default gw $ipgateway\n");1167 fprintf(fout, "fi\n");1168 fprintf(fout, "ping -c $ipcount $nfs_server_ipaddr # ping server\n");1169 fprintf(fout, "mount -t nfs -o nolock $nfsmount /tmp/isodir\n");1170 paranoid_fclose(fout);1171 chmod(outfile, 0777);1172 1121 make_hole_for_dir("/var/cache/mondo-archive"); 1173 1174 // paranoid_system ("mkdir -p /var/cache/mondo-archive 2> /dev/null");1175 1176 asprintf(&tmp, "cp -f %s /var/cache/mondo-archive", outfile);1177 paranoid_free(outfile);1178 1179 run_program_and_log_output(tmp, FALSE);1180 paranoid_free(tmp);1181 1122 1182 1123 asprintf(&tmp, "%s/NFS-DEV", bkpinfo->tmpdir); -
trunk/mondo/mondo/common/newt-specific.c
r688 r764 1457 1457 1458 1458 /*@ int ************************************************************* */ 1459 int i = 0;1460 1459 int currline = 0; 1461 1460 int finished = FALSE; 1461 1462 /*@ long ************************************************************ */ 1463 long i = 0; 1462 1464 long lng = 0; 1463 1465 … … 1504 1506 } 1505 1507 asprintf(&differ_sz, 1506 _(" % d files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list."),1508 _(" %ld files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list."), 1507 1509 i); 1508 1510 newtPushHelpLine(differ_sz); -
trunk/mondo/mondo/mondorestore/mondo-prep.c
r729 r764 2190 2190 #else 2191 2191 asprintf(&program, "raidstart %s", raid_device); 2192 // sprintf (program, "raidstart " RAID_DEVICE_STUB "*");2193 2192 #endif 2194 2193 log_msg(1, "program = %s", program); -
trunk/mondo/mondo/mondorestore/mondo-rstr-newt.c
r729 r764 883 883 static int lines_in_flist_window = 0; 884 884 static int depth = 0; 885 int i = 0; 885 886 /** long **************************************************************/ 887 long i = 0; 886 888 887 889 /** structures *******************************************************/ … … 1363 1365 paranoid_free(size_str); 1364 1366 1365 newtListboxSetEntry(listbox, ( int) keylist[currline],1367 newtListboxSetEntry(listbox, (long) keylist[currline], 1366 1368 mountlist_entry_to_string(mountlist, currline)); 1367 1369 /* if new /dev/md RAID device then do funky stuff */ … … 2489 2491 { 2490 2492 2491 /** int*************************************************************/2492 inti = 0;2493 /** long **************************************************************/ 2494 long i = 0; 2493 2495 2494 2496 assert(disklist != NULL); … … 2521 2523 { 2522 2524 2523 /** int**************************************************************/2524 inti = 0;2525 /** long **************************************************************/ 2526 long i = 0; 2525 2527 2526 2528 assert(mountlist != NULL); … … 2554 2556 { 2555 2557 2556 /** int **************************************************************/2557 inti = 0;2558 /** long *************************************************************/ 2559 long i = 0; 2558 2560 2559 2561 /** buffers **********************************************************/ … … 2590 2592 void *keylist[], newtComponent listbox) 2591 2593 { 2592 /** int *************************************************************/2593 inti = 0;2594 /** long ************************************************************/ 2595 long i = 0; 2594 2596 2595 2597 /** buffers *********************************************************/ -
trunk/mondo/mondo/mondorestore/mondo-rstr-tools.c
r729 r764 2155 2155 asprintf(&command, "mount /dev/fd0u1722 %s", mountpt); 2156 2156 asprintf(&tmp, 2157 "(sleep 15; kill `ps ax| grep \"%s\" | cut -d' ' -f1` 2> /dev/null) &",2157 "(sleep 15; kill `ps | grep \"%s\" | cut -d' ' -f1` 2> /dev/null) &", 2158 2158 command); 2159 2159 log_msg(1, "tmp = '%s'", tmp); -
trunk/tools/DISTROS
r649 r764 11 11 suse_10.1 12 12 sles_9 13 gentoo_2006 13 sles_10 14 debian_3.1 15 gentoo_1.6 14 16 slackware_10.2 15 debian_3.1 -
trunk/tools/build2pkg
r729 r764 8 8 # 9 9 10 umask 022 10 ( 11 11 dname=`dirname $0` 12 12 prem=`echo $dname |cut -c1` … … 55 55 src=${TOPDIR}/${VER}-$TAG/$p-[1-9st]*.tar.gz 56 56 pv=`basename $src .tar.gz` 57 PVER=`echo $pv | sed "s|^$p-||" | cut -d- -f1` 57 58 58 59 if [ _"$dtype" = _"rpm" ]; then … … 69 70 log=$TMP/$p-rpm.log 70 71 71 if [ "$dfam" = "mandriva" ||"$dfam" = "suse" ]; then72 echo " Generating bzip2 files ($dfam)"73 gzip -cd $src | bzip2 -c3 > SOURCES/$pv.tar.bz272 if [ "$dfam" = "mandriva" ] || [ "$dfam" = "suse" ]; then 73 echo "Using bzip2 files ($dfam)" 74 ln -sf $pv.tar.bz2 SOURCES/ 74 75 else 76 echo "Using gzip files ($dfam)" 75 77 ln -sf $src SOURCES/ 76 78 fi 77 79 echo "Generating $p RPMS" 78 80 cd SPECS 79 tar xfz $src $p-${ VER}/distributions/${ddir}-$dver/$p.spec80 mv $p-${ VER}/distributions/${ddir}-$dver/$p.spec .81 rm -rf $p-${ VER}81 tar xfz $src $p-${PVER}/distributions/${ddir}-$dver/$p.spec 82 mv $p-${PVER}/distributions/${ddir}-$dver/$p.spec . 83 rm -rf $p-${PVER} 82 84 83 rpmbuild -ba $p.spec 2> $log 1>$log85 rpmbuild -ba $p.spec 2>&1 | tee $log 84 86 if [ $? != 0 ]; then 85 cat $log86 87 status=-1 87 88 else 88 egrep '^Wrote:' $log 89 rpmlint `egrep '^Wrote:' $log | cut -d: -f2` 89 if [ -f /usr/bin/rpmlint ]; then 90 /usr/bin/rpmlint `egrep '^Wrote:' $log | cut -d: -f2` 91 else 92 echo "No rpmlint found, please install it" 93 fi 90 94 fi 91 95 rm -rf ${TOPBUILDDIR}/BUILD/* … … 93 97 elif [ _"$dtype" = _"ebuild" ]; then 94 98 log=$TMP/$p-gentoo.log 95 ln -sf $src . 96 tar xfz $src $p-${VER}/distributions/${ddir}-$dver/$p-${VER}.ebuild 99 tar xfz $src $p-${PVER}/distributions/${ddir}-$dver/$p-${PVER}.ebuild 97 100 if [ _"`grep $TOPBUILDDIR/portage /etc/make.conf`" = _"" ]; then 98 101 echo "Adding $TOPBUILDDIR/portage to /etc/make.conf" … … 101 104 102 105 mkdir -p ${TOPBUILDDIR}/portage/sys-apps/$p 103 mv $p-${ VER}/distributions/${ddir}-$dver/$p-${VER}.ebuild ${TOPBUILDDIR}/portage/sys-apps/$p104 rm -rf $p-${ VER}106 mv $p-${PVER}/distributions/${ddir}-$dver/$p-${PVER}.ebuild ${TOPBUILDDIR}/portage/sys-apps/$p/$p-${PVER}.ebuild 107 rm -rf $p-${PVER} 105 108 106 109 cd ${TOPBUILDDIR}/portage/sys-apps/$p 107 ebuild $p-${ VER}.ebuild digest 2> $log 1> $log110 ebuild $p-${PVER}.ebuild digest 2> $log 1> $log 108 111 if [ $? != 0 ]; then 109 112 cat $log 110 113 status=-1 111 114 fi 112 ebuild $p-${VER}.ebuild unpack 2>> $log 1>> $log 113 if [ $? != 0 ]; then 114 cat $log 115 status=-1 116 fi 117 ebuild $p-${VER}.ebuild compile 2>> $log 1>> $log 118 if [ $? != 0 ]; then 119 cat $log 120 status=-1 121 fi 122 #ebuild $p-${VER}.ebuild install 2>> $log 1>> $log 115 ebuild $p-${PVER}.ebuild install 2>> $log 1>> $log 123 116 if [ $? != 0 ]; then 124 117 cat $log … … 130 123 cd $TOPBUILDDIR 131 124 tar xfz $src 132 cd ${p}-${ VER}125 cd ${p}-${PVER} 133 126 # point to the right debian conf 134 127 ln -s distributions/${ddir}-$dver debian … … 149 142 fi 150 143 fi 144 ) 2>&1 | tee /tmp/build2pkg.log -
trunk/tools/build2qemu
r729 r764 13 13 # Syntax: build2qemu [version-tag [vm1]..|vmx]] 14 14 15 umask 022 15 ( 16 16 dname=`dirname $0` 17 17 prem=`echo $dname |cut -c1` … … 82 82 sleep 300 83 83 fi 84 scp -P $sp $TMP/mkmondo.tar.gz bruno@localhost:84 scp -P $sp $TMP/mkmondo.tar.gz ~/.rpmmacros ~/.rpmrc bruno@localhost: 85 85 rdate=`date "+%m%d%H%M"` 86 86 ssh -p $sp root@localhost "date $rdate" … … 100 100 # Should be removed at the end 101 101 rm -rf $TMP 102 ) 2>&1 | tee /tmp/build2qemu.log -
trunk/tools/common-env
r729 r764 11 11 mkdir -p ${TOPDIR} 12 12 export TMPDIR=/tmp 13 export TMP=`mktemp -d `13 export TMP=`mktemp -d /tmp/mondobuild.XXXXXXXXXX` 14 14 15 15 umask 022 -
trunk/tools/distro-env
r672 r764 72 72 dfam="gentoo" 73 73 dtype="ebuild" 74 suf=".${ddir}${dver}" 74 dver1=`echo ${dver} | sed "s/\.//"` 75 suf=".${ddir}${dver1}" 75 76 BUILDDIR=${TOPDIR}/ebuild 76 77 elif [ $ddir = "slackware" ]; then -
trunk/tools/file2ftp
r592 r764 5 5 # $Id$ 6 6 # 7 8 ( 7 9 8 10 dname=`dirname $0` … … 44 46 45 47 for p in $c; do 46 src="$src ${TOPDIR}/${VER}-$TAG/$p-[1-9st]*.tar.gz" 48 src1="${TOPDIR}/${VER}-$TAG/$p-[1-9st]*.tar.gz" 49 src2=`echo $src1 | sed 's/\.tar\.gz//'` 50 src="$src $src1 $src2.tar.bz2" 47 51 done 52 48 53 49 54 echo "Sources delivery to ${ACCOUNT}:${DSTDIR}/src" … … 56 61 lftp -e "cd ${FTPDIR} ; put ${src} ; quit" ${FTPSERV} 57 62 fi 63 ) 2>&1 | tee /tmp/file2ftp.log -
trunk/tools/mkannounce
r672 r764 30 30 TAG=`echo $LAST | cut -d- -f2` 31 31 32 SEARCH=`echo $ LAST| cut -c2-`32 SEARCH=`echo $VER | cut -c2-` 33 33 34 34 rm -f $TMP/announce.tmp 35 35 cat > $TMP/announce.tmp << EOF 36 MondoRescue $ LASTis now available</p>36 MondoRescue $VER is now available</p> 37 37 38 <p>I'm happy to announce the availability of a newest version of mondoescue $ LAST. Enjoy it as usual!</p>38 <p>I'm happy to announce the availability of a newest version of mondoescue $VER. Enjoy it as usual!</p> 39 39 <p> 40 40 Now available at <a href="ftp://ftp.mondorescue.org/">ftp://ftp.mondorescue.org/ -
trunk/tools/mknewversion
r652 r764 8 8 # 9 9 10 umask 02211 10 dname=`dirname $0` 12 11 prem=`echo $dname |cut -c1` -
trunk/tools/pkg2ftp
r729 r764 6 6 # 7 7 8 9 ( 8 10 dname=`dirname $0` 9 11 prem=`echo $dname |cut -c1` … … 56 58 ar=$ARCH 57 59 fi 58 pkg="$pkg ${TOPBUILDDIR}/RPMS/${ar}/$pv ${suf}.${ar}.rpm"59 spkg="$spkg ${TOPBUILDDIR}/SRPMS/$pv ${suf}.src.rpm"60 pkg="$pkg ${TOPBUILDDIR}/RPMS/${ar}/$pv-${TAG}${suf}.${ar}.rpm" 61 spkg="$spkg ${TOPBUILDDIR}/SRPMS/$pv-${TAG}${suf}.src.rpm" 60 62 elif [ _"$dtype" = "_deb" ]; then 61 pkg="$pkg ${TOPBUILDDIR}/$p_*. rpm"63 pkg="$pkg ${TOPBUILDDIR}/$p_*.deb" 62 64 spkg="$spkg ${TOPBUILDDIR}/$p_*.dsc ${TOPBUILDDIR}/$p_*.tar.gz" 63 65 fi … … 67 69 ssh ${ACCOUNT} "mkdir -p ${DSTDIR}/${ddir}/${dver}" 68 70 scp ${pkg} ${spkg} ${ACCOUNT}:${DSTDIR}/${ddir}/${dver} 71 ) 2>&1 | tee /tmp/pkg2ftp.log -
trunk/tools/pkg2mdv
r649 r764 6 6 # 7 7 8 ( 8 9 dname=`dirname $0` 9 10 prem=`echo $dname |cut -c1` … … 82 83 echo "Packages rebuild on ${DSTNODE}" 83 84 ssh ${ACCOUNT} ${DSTNODE} "./mkmondo" 85 ) 2>&1 | tee /tmp/pk2mdv.log -
trunk/tools/qemu-vm.txt
r649 r764 1 Booting CD1 #Booting CD 2 2 qemu-img create -f qcow image.qemu 3G 3 3 qemu -cdrom /dev/hdc -m 256 -boot d image.qemu 4 4 5 5 # RPM based : urpmi, yum install, yast2 6 neon newt-devel slang-devel autoconf automake libtool gcc rpm-build wget vim-X11 gcc-c++ docbook-utils-pdf ImageMagick man patch 6 urpmi neon newt-devel slang-devel autoconf automake libtool gcc rpm-build wget gvim/vim-X11 gcc-c++ docbook-utils-pdf ImageMagick man patch mindi mondo 7 7 8 8 # gentoo 9 Cf: http://wiki.xensource.com/xenwiki/QEMUGentoo9 #Cf: http://wiki.xensource.com/xenwiki/QEMUGentoo 10 10 emerge neon newt slang autoconf automake subversion libtool gcc wget vim man groff lynx grub afio buffer mindi mondo-rescue 11 11 12 Changing CD during install:12 #Changing CD during install: 13 13 Ctrl-Alt-2 14 14 eject cdrom … … 16 16 change cdrom /dev/cdrom 17 17 18 Boot single user pour change passwd root 19 Clavier fr: 18 # Slack: put loadkeys fr in /etc/rc.d/rc.keymap 20 19 21 loadkeys fr 22 perl -pi -e 's/"us"/"fr"/' /etc/sysconfig/keyboard 23 perl -pi -e 's/"us"/"fr"/' /etc/X11/XF86Config 24 perl -pi -e 's/"us"/"fr"/' /etc/X11/xorg.conf 25 Slack: put loadkeys fr in /etc/rc.d/rc.keymap 26 27 Conf IP: 28 Ajout machine dans DNS interne (/usr/local/etc/named/etc/db.mondo.*) 29 Reload named 30 31 Clé SSH: 32 Ajout clé ssh pour root: 20 #Clé SSH: 21 # Ajout clé ssh pour root: 33 22 mkdir /root/.ssh 34 23 chmod 700 /root/.ssh … … 36 25 chmod 600 /root/.ssh/authorized_keys 37 26 38 Install packages manquant pour mondo: 39 afio buffer 40 41 Créer compte bruno avec répertoires nécéssaires + env necessaire 27 #Créer compte bruno avec répertoires nécéssaires + env necessaire 42 28 mkdir /users 43 29 useradd bruno -d /users/bruno … … 60 46 chmod 700 ~/.ssh 61 47 scp -p victoria2.home.musique-ancienne.org:.ssh/id'*' ~/.ssh 48 # Passwd asked above 62 49 cp ~/.ssh/id_dsa.pub ~/.ssh/authorized_keys 63 50 chmod 600 ~/.ssh/authorized_keys … … 68 55 EOF 69 56 70 rebuild paquets necessaires mondo:57 #rebuild paquets necessaires mondo: 71 58 wget ftp://ftp.mondorescue.org/src/afio-2.4.7-1.src.rpm 72 59 wget ftp://ftp.mondorescue.org/src/buffer-1.19-1.src.rpm 73 60 rpm -ivh afio-2.4.7-1.src.rpm buffer-1.19-1.src.rpm 74 mkdir -p build/BUILD build/RPMS/i386 61 mkdir -p build/BUILD build/RPMS/i386 build/SRPMS 75 62 rpmbuild -ba build/SPECS/afio.spec 76 63 rpmbuild -ba build/SPECS/buffer.spec 77 64 chmod 644 build/RPMS/i386/* 78 scp -p build/RPMS/i 386/afio-[0-9]* build/RPMS/i386/buffer-[0-9]* ftp.mondorescue.org:/mondo/ftp/rhel/3/65 scp -p build/RPMS/i?86/afio-[0-9]* build/RPMS/i?86/buffer-[0-9]* ftp.mondorescue.org:/mondo/ftp/rhel/3/ 79 66 80 67 81 68 root: 82 rpm -ivh ~bruno/RPMS/RPMS/i386/afio-[0-9]* ~bruno/RPMS/RPMS/i386/buffer-[0-9]* 69 rpm -ivh ~bruno/build/RPMS/i?86/afio-[0-9]* ~bruno/build/RPMS/i?86/buffer-[0-9]* 70 # In case 71 scp bruno@10.0.2.2:/usr/bin/man2dvi /usr/local/bin 83 72 84 pour gentoo73 #for gentoo 85 74 chown bruno /etc/make.conf 86 75 bruno in portage group -
trunk/tools/svn2build
r729 r764 6 6 # 7 7 8 ( 8 9 dname=`dirname $0` 9 10 prem=`echo $dname |cut -c1` … … 82 83 rm -f $TMP/$p.spec 83 84 elif [ "$dtype" = "ebuild" ]; then 84 m4 $TMP/mondorescue.mc $dest/distributions/$dfam/$p.ebuild > $dest/distributions/${ddir}-$dver/$p-$v -r$TAG.ebuild85 m4 $TMP/mondorescue.mc $dest/distributions/$dfam/$p.ebuild > $dest/distributions/${ddir}-$dver/$p-$v.ebuild 85 86 elif [ "$dtype" = "deb" ]; then 86 87 # To be developped 87 88 #m4 $TMP/mondorescue.mc $dest/distributions/$dfam/$p > /dev/null 88 89 cp -a $dest/distributions/$ddir/* $dest/distributions/${ddir}-$dver 90 m4 $TMP/mondorescue.mc $dest/distributions/$ddir/rules > $dest/distributions/${ddir}-$dver/rules 89 91 $TOOLHOME/mkchangelog.pl $dtype $p $dest/distributions/${ddir}-$dver/changelog 90 92 if [ $? -ne 0 ]; then … … 135 137 # Finally creates the tar files 136 138 echo "Creating $p tar files" 137 tar cfhz ${DEST}/$p-$v-$TAG.tar.gz $dest 138 #gzip -cd ${DEST}/$p-$v-$TAG.tar.gz | bzip2 -c3 > ${DEST}/$p-$v-$TAG.tar.bz2 139 #tar cfhj ${DEST}/$p-$v-$TAG.tar.bz2 $dest 139 tar cfphz ${DEST}/$p-$v.tar.gz $dest 140 tar cfphj ${DEST}/$p-$v-$TAG.tar.bz2 $dest 140 141 done 141 142 … … 148 149 echo "${VER}-$TAG" > ${TOPDIR}/LAST 149 150 exit 0 151 ) 2>&1 | tee /tmp/svn2build.log -
trunk/website/support.shtml
r397 r764 19 19 </ul></p> 20 20 <p>Second look at the <a href="/docs.shtml">Mondo Rescue documentation</a> and the extensive FAQ section of the Mondo Rescue HOWTO, as a lot of good tip and tricks are provided there.</p> 21 <p>Third look at the <a href="http:// openfacts.berlios.de/index-en.phtml?title=mondorescue">Mondo Rescue wiki</a> which may contain additional comments,and feel free to contribute by adding your remarks.</p>21 <p>Third look at the <a href="http://www.mondorescue.org/cgi-bin/trac.cgi/wiki">Mondo Rescue wiki</a> which may contain additional comments,and feel free to contribute by adding your remarks.</p> 22 22 <p>Fourth look at the <a href="http://sourceforge.net/mailarchive/forum.php?forum_id=5086">Mondo Rescue Mailing List Archives</a> as you're probably not the first with this problem.</p> 23 23 <p>Finally post on the <a href="mailto:mondo-devel_at_lists.sourceforge.net">Mondo Rescue Mailing List</a> if you did not find what you were looking for, as there are more than 400 users there who could help you, including dev team members. <b>But</b>, they can only help you if your provide at least the above mentionned <b>2 first log files</b>.</p> 24 <p>If your think you found a bug in Mondo Rescue, please <a href="http s://developer.berlios.de/bugs/?group_id=2524">fill a bug report</a> and also include the log files.</p>25 <p>Likely, if you wish Mondo Rescue had your dreamed new shiny function, feel free to create an <a href="http s://developer.berlios.de/feature/?group_id=2524">feature request</a>.</p>24 <p>If your think you found a bug in Mondo Rescue, please <a href="http://www.mondorescue.org/cgi-bin/trac.cgi/newticket">fill a bug report</a> and also include the log files.</p> 25 <p>Likely, if you wish Mondo Rescue had your dreamed new shiny function, feel free to create an <a href="http://www.mondorescue.org/cgi-bin/trac.cgi/newticket">feature request</a>.</p> 26 26 <div class="h2-3"> 27 27 <h2>Mondo Rescue Mailing Lists</h2> -
trunk/website/top.shtml
r404 r764 36 36 <li <!--#if expr="\"$curpage\" = \"support.shtml\"" --> id="current" <!--#endif -->> 37 37 <a href="/support.shtml" title="If you need support (why it's perfect :-)" >Support</a></li> 38 <li><a href="http:// openfacts.berlios.de/index-en.phtml?title=mondorescue" title="Use the Wiki" target="_blank" >Wiki</a></li>38 <li><a href="http://www.mondorescue.org/cgi-bin/trac.cgi/wiki/WikiStart" title="Use the Wiki" target="_blank" >Wiki</a></li> 39 39 <li <!--#if expr="\"$curpage\" = \"thanks.shtml\"" --> id="current" <!--#endif -->> 40 40 <a href="/thanks.shtml" title="So many helped us. Many thanks" >Thanks</a></li>
Note:
See TracChangeset
for help on using the changeset viewer.