Changeset 764 in MondoRescue


Ignore:
Timestamp:
Aug 8, 2006, 12:34:37 AM (18 years ago)
Author:
Bruno Cornec
Message:

merge -r728:763 $SVN_M/branches/stable

Location:
trunk
Files:
52 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/mindi-kernel/distributions/mandriva/spec.m4

    r729 r764  
    22dnl
    33dnl SSS is replaced by the source package format
    4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-TTT.tar.bz2')dnl
     4define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl
    55dnl DDD is replaced by the list of dependencies specific to that distro
    66define(`DDD', `')dnl
  • trunk/mindi-kernel/distributions/redhat/spec.m4

    r729 r764  
    22dnl
    33dnl SSS is replaced by the source package format
    4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-TTT.tar.gz')dnl
     4define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.gz')dnl
    55dnl DDD is replaced by the list of dependencies specific to that distro
    66define(`DDD', `')dnl
  • trunk/mindi-kernel/distributions/suse/spec.m4

    r729 r764  
    22dnl
    33dnl SSS is replaced by the source package format
    4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-TTT.tar.bz2')dnl
     4define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl
    55dnl DDD is replaced by the list of dependencies specific to that distro
    66define(`DDD', `, syslinux')dnl
  • trunk/mindi/ChangeLog

    r687 r764  
    33MINDI CHANGES
    44
    5 1.0.9 (2006-06-26)
     51.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)
    618- nfsmount option added to allow redeployment from another NFS server (Bruno Cornec)
    719- Replaced all occurrences of egrep with 'grep -E' and of fgrep with 'grep -F' (Andree Leidenfrost)
  • trunk/mindi/README

    r270 r764  
    2828
    2929You can get the latest packages from
    30 http://developer.berlios.de/project/showfiles.php?group_id=2524.
     30ftp://ftp.mondorescue.org
    3131
    3232Please see file 'INSTALL' for instructions about how to build and install
     
    5050
    5151Apart 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.
     52contents at the following URL: http://www.mondorescue.org/cgi-bin/trac.cgi/wiki
    5353
    5454Also, there is a mailing list mondo-devel@lists.sourceforge.net. Please go to
  • trunk/mindi/analyze-my-lvm

    r729 r764  
    169169
    170170ListLvmDrivesAndPartitions() {
    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}'
    172172}
    173173
  • trunk/mindi/distributions/gentoo/mindi.ebuild

    r588 r764  
    77DESCRIPTION="A program that creates emergency boot disks/CDs using your kernel, tools and modules."
    88HOMEPAGE="http://www.mondorescue.org"
    9 SRC_URI="ftp://ftp.mondorescue.org/src/${PVR}.tar.gz"
     9SRC_URI="ftp://ftp.mondorescue.org/src/${P}.tar.gz"
    1010
    1111LICENSE="GPL-2"
     
    3030    export DONT_RELINK=1
    3131    export RPMBUILDMINDI="true"
    32     ./install.sh
     32    ${WORKDIR}/${P}/install.sh
    3333}
    3434
  • trunk/mindi/distributions/mandriva/spec.m4

    r729 r764  
    22dnl
    33dnl SSS is replaced by the source package format
    4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-TTT.tar.bz2')dnl
     4define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl
    55dnl DDD is replaced by the list of dependencies specific to that distro
    66define(`DDD', `, which, grep >= 2.5')dnl
  • trunk/mindi/distributions/redhat/spec.m4

    r729 r764  
    22dnl
    33dnl SSS is replaced by the source package format
    4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-TTT.tar.gz')dnl
     4define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.gz')dnl
    55dnl DDD is replaced by the list of dependencies specific to that distro
    66define(`DDD', `, which, grep >= 2.5')dnl
  • trunk/mindi/distributions/suse/spec.m4

    r729 r764  
    22dnl
    33dnl SSS is replaced by the source package format
    4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-TTT.tar.bz2')dnl
     4define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl
    55dnl DDD is replaced by the list of dependencies specific to that distro
    66define(`DDD', `, syslinux')dnl
  • trunk/mindi/mindi

    r729 r764  
    284284    [ "$KBDEPTH" -gt "128" ] && Die "Edit $MINDI_SBIN/mindi and disable FindAndAddUserKeyboardMappingFile (line 2160, approx.)"
    285285    if [ -e "$bigdir/$mappath" ] ; then
    286     echo "$mappath already added" >> $LOGFILE
    287     return
     286        echo "$mappath already added" >> $LOGFILE
     287        return
    288288    elif [ -d "$bigdir/$mappath" ] ; then
    289289        echo "Cannot add $mappath: it's a directory. Sorry."
     
    298298        fi
    299299    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 '#' '.'
    301301    fi
    302302
     
    610610    [ ! -e "$KEYDIR" ] && KEYDIR=/usr/share
    611611    if [ ! -e "$KEYDIR" ] ; then
    612     LogIt "Keyboard mapping directory not found. I shall use default map at boot-time.\n"
    613     return 0
     612        LogIt "Keyboard mapping directory not found. I shall use default map at boot-time.\n"
     613        return 0
    614614    fi
    615615    if [ -e "/etc/sysconfig/keyboard" ] ; then
    616     echo "Red Hat-style config detected." >> $LOGFILE
    617     keyfile=/etc/sysconfig/keyboard
     616        echo "Red Hat-style config detected." >> $LOGFILE
     617        keyfile=/etc/sysconfig/keyboard
    618618    elif [ -e "/etc/rc.d/rc.keymap" ] ; then
    619     echo "Slackware-style config detected." >> $LOGFILE
    620     keyfile=/etc/rc.d/rc.keymap
     619        echo "Slackware-style config detected." >> $LOGFILE
     620        keyfile=/etc/rc.d/rc.keymap
    621621    elif [ -e "/etc/rc.config" ] ; then
    622622        echo "Debian-style config detected." >> $LOGFILE
    623     keyfile=/etc/rc.config
     623        keyfile=/etc/rc.config
    624624    elif [ -e "/etc/console/boottime.kmap.gz" ] ; then
    625625        echo "Debian-style config detected." >> $LOGFILE
    626     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
     626        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
    643643    fi
    644644    if [ ! -e "$KEYDIR/keymaps" ] ; then
     
    650650    [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'`        # Slackware
    651651    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 " *#.*"`
    653653    [ ! "$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
    654660    for i in $mp ; do
    655661        mappath=$i
     
    661667    echo "mappath = $mappath" >> $LOGFILE
    662668    if [ ! -e "$mappath" ] || [ -d "$mappath" ] ; then
    663     LogIt "Keyboard mapping file not found. Default keyboard map will be used.\n"
    664     return
     669        LogIt "Keyboard mapping file not found. Default keyboard map will be used.\n"
     670        return
    665671    fi
    666672    echo -en "Adding the following keyboard mapping tables: "
     
    926932        fi
    927933        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" ] ; then
     934    if [ -e "$MONDO_TMP/NFS-DEV" ] ; then
    929935        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
    934939        done
    935940    fi
     
    11221127
    11231128
    1124 
    11251129#ListKernelModules() {
    11261130    #local output q
     
    11401144        if [ ! -e "$fname" ] ; then
    11411145            echo "Warning - $fname does not exist; cannot be LDD'd." >> $LOGFILE
    1142         if echo $fname | grep lvm &> /dev/null ; then
    1143         echo "This warning only affects you if you are using LVM." >> $LOGFILE
    1144         if lsmod | grep lvm &> /dev/null ; then
    1145             echo "I think you are, so please take heed!" >> $LOGFILE
    1146 #           LogIt "Where is liblvm? You need it."
    1147         else
    1148             echo "I don't think you are, so don't worry about it." >> $LOGFILE
    1149         fi
    1150         fi
     1146            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
    11511155        elif [ -h "$fname" ] && [ -x "$fname" ] ; then
    1152         echo "$fname is softlink" >> $LOGFILE
     1156            echo "$fname is softlink" >> $LOGFILE
    11531157#            echo "$fname will not be LDD'd. It is a softlink to `WhatSoftlinkPointsTo $fname`, which should already be in queue to be analyzed." >> $LOGFILE
    11541158#            echo "$fname"
     
    13771381    all_partitions=""
    13781382   
    1379     if [ -d "/proc/lvm" ] || [ -d "/dev/mapper" ]; then
     1383    if [ $LVM != "false" ]; then
    13801384        echo -en "\rAnalyzing LVM...\r"
    13811385        all_partitions=`$MINDI_LIB/analyze-my-lvm | grep -F ">>>" | cut -d' ' -f2-32`
     
    13871391    done
    13881392    [ "$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
    13901394    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"
    13911395    for c_p in $all_partitions ; do
     
    14181422            actual_dev=""
    14191423   
    1420             # 1st try : blkid, the good way
     1424            # 1st try : blkid, the good way for all LABEL
    14211425            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
    14231440            fi
    14241441   
    14251442            # 2nd try, which works on a standard partition (ext2/3), but not on swap
     1443            # For LVM gives a /dev/mapper entry
    14261444            if [ "x$actual_dev" = "x" ]; then
    14271445                actual_dev=`/bin/mount -l | /bin/grep "\[$redhat_label\]" | /bin/cut -d' ' -f1`
    14281446            fi
    14291447   
    1430             # 3rd try, with vol_id (which works with swap)
     1448            # 3rd try, with vol_id
     1449            # SWAP only
    14311450            if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ]; then
    14321451                list_swaps=`cat /proc/swaps | /bin/grep "/dev/" | /bin/awk '{ print $1 }' `
     
    14411460
    14421461            # 4th try : pre-formated LABEL. Format is : LABEL=SWAP-mydevice. e.g. : LABEL=SWAP-hda5
     1462            # SWAP only
    14431463            if [ "x$actual_dev" = "x" -a  _"`echo $current_partition | /bin/grep -i 'LABEL=SWAP'`" != _"" ]; then
    14441464                try_dev="`echo "$redhat_label" | /bin/cut -d '-' -f2`"
     
    14531473                current_partition=$actual_dev
    14541474            else
    1455                 Die "Your system uses a labelled swap partition, but you lack the tool to support it.\nPlease replace swap labels with their correct devices in /etc/fstab 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"
    14561476            fi
    14571477        else
     
    14591479        fi
    14601480
    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 fstab
    1463     # for LVM partitions but use /dev/mapper/<VG>-<LV> instead. Fortunately,
    1464     # the former is then a link to the latter, so we test whether
    1465     # $current_partition is actually such a link or not and set
    1466     # $current_lvolume accordingly. Note that $current_lvolume may well be an
    1467     # ordinary device. It is just to make sure that we feed the right value
    1468     # into any of the LVM tools if possible.
    1469     if [ -d "/dev/mapper" ] && [ -z "`lvm lvdisplay $current_partition 2> /dev/null`" ]; then
    1470         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     fi
    1473     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
    14741494        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"
    14881516                [ "$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
    15091600        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"
    15631606            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
    15811608    done
    15821609}
     
    16111638    rm -f $1.tmp
    16121639    if [ "$CDRECOVERY" != "yes" ] ; then
    1613         if [ -e "$MONDO_TMP/start-nfs" ] ; then
     1640        if [ -e "$MONDO_TMP/NFS-DEV" ] ; then
    16141641            echo -en "Press <enter> to continue.\n" >> $1
    16151642        elif [ ! "$MONDO_TMP" ] ; then
     
    16941721    cd $TMP_ROOT/iso/isolinux
    16951722    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" ] ; then
    1697     mv isolinux.cfg isolinux.cfg.old
    1698     sed s/interactive/iso/ isolinux.cfg.old > isolinux.cfg
     1723    if [ -e "$MONDO_TMP/NFS-DEV" ] ; then
     1724        mv isolinux.cfg isolinux.cfg.old
     1725        sed s/interactive/iso/ isolinux.cfg.old > isolinux.cfg
    16991726    fi
    17001727    if [ "$ARCH" != "ia64" ] ; then
    17011728        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 ../
    17031730    fi
    17041731    cd $TMP_ROOT/iso
     
    17081735    [ "$MONDO_SHARE" ] && cp -f $MONDO_SHARE/autorun .   
    17091736    if [ -d "/home/MondoCD" ] ; then
    1710     cp -pRdu /home/MondoCD/* .
     1737        cp -pRdu /home/MondoCD/* .
    17111738    fi
    17121739    if [ "$ARCH" != "ia64" ] ; then
     
    17481775    if [ "`DidMondoCallMe`" ] ; then
    17491776        if [ "$CDRECOVERY" != "yes" ] ; then
    1750             if [ -e "$MONDO_TMP/start-nfs" ] ; then
     1777            if [ -e "$MONDO_TMP/NFS-DEV" ] ; then
    17511778                echo -en "Press <enter> to continue.\n"
    17521779            elif [ ! "$MONDO_TMP" ] ; then
     
    18561883        echo -en "default=RESTORE\n"
    18571884    elif [ "$disksize" -gt "2880" ] && [ "`DidMondoCallMe`" ] ; then
    1858         if [ -e "$MONDO_TMP/start-nfs" ] ; then
     1885        if [ -e "$MONDO_TMP/NFS-DEV" ] ; then
    18591886            echo -en "default=iso\n"
    18601887        else
     
    18771904    elif [ "$disksize" -gt "2880" ] ; then
    18781905        if [ "`DidMondoCallMe`" ] ; then
    1879             if [ -e "$MONDO_TMP/start-nfs" ] ; then
     1906            if [ -e "$MONDO_TMP/NFS-DEV" ] ; then
    18801907                options="iso"
    18811908            else
     
    21032130#    tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz\n" <--- present for LILO; is it nec. for SYSLINUX too?
    21042131    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" ] ; then
     2132    if [ -e "$MONDO_TMP/NFS-DEV" ] ; then
    21062133        mv syslinux.cfg syslinux.cfg.orig
    21072134        sed s/interactive/iso/ syslinux.cfg.orig > syslinux.cfg
     
    22922319    cp -f $TMP_ROOT/mountlist.txt $CACHE_LOC
    22932320    [ "`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
    22962322    cat $minidir_root/$noof_disks/tmp/mountlist.txt >> $LOGFILE
    22972323    ZipMinidirsIntoTarballs $minidir_root $tardir $noof_disks
     
    28402866        list_of_groovy_mods="$CDROM_MODS `WhichOfTheseModulesAreLoaded "$SCSI_MODS"`"
    28412867    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
    28442869        # For PXE boot
    28452870        list_of_groovy_mods="$list_of_groovy_mods $NET_MODS"
     
    30443069mkdir -p $MONDO_ROOT
    30453070
     3071if [ -d "/proc/lvm" ]; then
     3072    # LVM v1
     3073    LVMCMD=""
     3074    LVM="v1"
     3075elif [ -d "/dev/mapper" ]; then
     3076    # LVM v2
     3077    LVMCMD="lvm"
     3078    LVM="v2"
     3079else
     3080    LVM="false"
     3081fi
     3082
    30463083if [ "$#" -ge "2" ] ; then
    30473084    if [ "$1" = "--max-compressed-size" ] ; then
  • trunk/mindi/rootfs/sbin/LogIt

    r30 r764  
    11#!/bin/sh
     2#
     3# $Id$
     4#
    25
    36#    if [ ! -e "/bin/date" ] ; then
     
    811currdate=""
    912
    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
     13LOGFILE=/tmp/mondo-restore.log
     14if [ ! -e "$LOGFILE" ] ; then
     15    echo "...first line..." > $LOGFILE
     16fi
    1617
    1718# LogIt $phrase ------ log only
  • trunk/mindi/rootfs/sbin/init

    r649 r764  
    11#!/bin/sh
    22#
    3 # 04/20/2005
    4 # - fix for 'skip the tape datadisks' bug (Joseph Smith)
     3# $Id$
    54#
    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
    1606#------------------------------------------------------------
    1617
     
    23278    openvt 6 /bin/sh
    23379    openvt 7 /bin/sh /sbin/wait-for-petris
    234 #    openvt 8 /usr/bin/tail -f /tmp/mondo-restore.log
    23580}
    23681
     
    385230    LogIt "Devfs found. Testing kernel support..."
    386231    if [ ! -e "/dev/.devfsd" ] ; then
    387         mount -t devfs devfs /dev 2>> /tmp/mondo-restore.log
     232        mount -t devfs devfs /dev 2>> $LOGFILE
    388233            if [ "$?" -ne "0" ] ; then
    389234        LogIt "Error while trying to mount devfs"
     
    441286    if [ -e "/tmp/i-want-my-lvm" ] ; then
    442287        LogIt "Scanning LVM's..." 1
    443     if which lvm ; then
    444         MyInsmod dm-mod
    445         MyInsmod dm_mod
    446         lvm vgscan --mknodes
    447     else
    448         vgscan
    449     fi
    450         grep -E "^#.*vgchange" /tmp/i-want-my-lvm | sed s/#// > /tmp/start-lvm
     288        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
    451296        chmod +x /tmp/start-lvm
    452297        echo -en "Starting LVM's..."
     
    461306# pipe vgscan's output, strip it, run 'vgchange' on its output, etc.etc.
    462307    LogIt "LVM's have been started."
    463 }
    464 
    465 
    466 
    467 StartNfs() {
    468     # using mount -o nolock avoids portmap requirement
    469     #if which portmap > /dev/null 2> /dev/null ; then
    470         #LogIt "Running portmap"
    471     #portmap
    472         #[ "$?" -eq "0" ] && LogIt "Portmap started OK" || LogIt "Portmap error"
    473         if [ -e "/sbin/start-nfs" ] ; then
    474             chmod 755 /sbin/start-nfs
    475         LogIt "Starting NFS..."
    476             /sbin/start-nfs
    477         fi
    478     #fi
    479308}
    480309
     
    539368        mount_cmd="mount /dev/shm -t tmpfs -o size=$size" ; # was 34m until 04/2003
    540369        LogIt "Trying '$mount_cmd'"
    541     $mount_cmd /tmp/tmpfs 2>> /tmp/mondo-restore.log
     370    $mount_cmd /tmp/tmpfs 2>> /$LOGFILE
    542371    res=$?
    543372    [ "$res" -eq "0" ] && break
     
    635464fi
    636465
    637 #if [ -e "/tmp/2880.siz" ] ; then
    638 #    HandleCDROMorFloppies
    639 #el
    640466if [ "`grep -i 'tape ' /tmp/mondo-restore.cfg`" ] || [ "`grep -i udev /tmp/mondo-restore.cfg`" ] ; then
    641         HandleTape
     467    HandleTape
    642468    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
     469elif [ "`grep -i pxe /proc/cmdline`" ]; then
     470    /sbin/start-nfs
     471
    663472    # Simulate a local CD
    664473    echo "/mnt/cdrom" > /tmp/CDROM-LIVES-HERE
    665         CD_MOUNTED_OK=yes
     474    CD_MOUNTED_OK=yes
    666475    ExtractDataDisksAndLoadModules
    667476else
    668477    HandleCDROMorFloppies
    669478    ExtractDataDisksAndLoadModules
    670     if [ -e "/sbin/start-nfs" ]; then
    671         StartNfs
    672     fi
     479    /sbin/start-nfs
    673480fi
    674481res=$?
     
    710517fi
    711518hack-cfg-if-necessary || LogIt "Cannot find hack-cfg-if-necessary"
    712 openvt 8 /usr/bin/tail -f /tmp/mondo-restore.log
     519openvt 8 /usr/bin/tail -f $LOGFILE
    713520
    714521#-------------------------------
  • trunk/mindi/rootfs/sbin/post-init

    r274 r764  
    7272else
    7373    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
    7776    else
    78     LogIt "Mindi-Linux has finished booting."
     77        LogIt "Mindi-Linux has finished booting."
    7978    fi
    8079fi
  • trunk/mondo-doc/distributions/debian/control

    r588 r764  
    1 Source: mondo
     1Source: mondo-doc
    22Section: utils
    33Priority: optional
    4 Maintainer: Bruno Cornec <bruno@mondorescue>
     4Maintainer: Bruno Cornec <bruno@mondorescue.org>
    55Build-Depends: debhelper (>= 4.2.20)
    66Standards-Version: 3.6.1
  • trunk/mondo-doc/distributions/debian/mondo-doc.doc-base

    r588 r764  
    1 Document: mondo
     1Document: mondo-doc
    22Title: Mondo Rescue and Mindi Linux HOWTO
    33Author: Hugo Rabson, Mikael Hultgren, Stan Benoit ("Troff"), Randy Delfs,
  • trunk/mondo-doc/distributions/debian/rules

    r588 r764  
    2323
    2424# 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
     25build-indep:
     26    $(MAKE) -f Makefile.man VERSION=VVV
     27    $(MAKE) -f Makefile.howto VERSION=VVV
    2728    touch build-indep-stamp
    2829
     
    5455    dh_testroot
    5556    dh_clean -k -i
    56     dh_installdirs -i
    57     dh_install -i
     57    $(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)
    5859
    5960# Must not depend on anything. This is to be called by
  • trunk/mondo-doc/distributions/gentoo/mondo.ebuild

    r588 r764  
    99DESCRIPTION="The premier GPL disaster recovery solution."
    1010HOMEPAGE="http://www.mondorescue.org"
    11 SRC_URI="ftp://ftp.mondorecue.org/src/${PN/-rescue/}-${PV}.tgz"
     11SRC_URI="ftp://ftp.mondorescue.org/src/${PN/-rescue/}-${PV}.tgz"
    1212
    1313LICENSE="GPL-2"
  • trunk/mondo-doc/distributions/mandriva/spec.m4

    r729 r764  
    22dnl
    33dnl SSS is replaced by the source package format
    4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-TTT.tar.bz2')dnl
     4define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl
    55dnl DDD is replaced by the list of dependencies specific to that distro
    66define(`DDD', )dnl
  • trunk/mondo-doc/distributions/redhat/spec.m4

    r729 r764  
    22dnl
    33dnl SSS is replaced by the source package format
    4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-TTT.tar.gz')dnl
     4define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.gz')dnl
    55dnl DDD is replaced by the list of dependencies specific to that distro
    66define(`DDD', )dnl
  • trunk/mondo-doc/distributions/rpm/mondo-doc.spec

    r729 r764  
    3232%install
    3333%{__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}
    3636
    3737%clean
     
    4040%files
    4141%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}
    4843
    4944%changelog
  • trunk/mondo-doc/distributions/suse/spec.m4

    r729 r764  
    22dnl
    33dnl SSS is replaced by the source package format
    4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-TTT.tar.bz2')dnl
     4define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl
    55dnl DDD is replaced by the list of dependencies specific to that distro
    66define(`DDD', `, buffer, cdrecord')dnl
  • trunk/mondo-doc/mindi.8

    r402 r764  
    177177.SH AUTHORS
    178178Bruno Cornec (lead-development)
    179 .I "bcornec_at_users.berlios.de"
     179.I "bcornec_at_mondorescue.org"
    180180.br
    181181Andree Leidenfrost (co-developper)
  • trunk/mondo-doc/mondorescue-howto.sgml

    r729 r764  
    11391139
    11401140# mindi
    1141 Mindi Linux mini-distro generator v1.06-r343
    1142 
    1143 Latest Mindi is available from http://mondorescue.berlios.de
     1141Mindi Linux mini-distro generator v1.09-r762
     1142
     1143Latest Mindi is available from http://www.mondorescueg
    11441144
    11451145BusyBox sources are available from http://www.busybox.net
  • trunk/mondo/ChangeLog

    r729 r764  
    88- Internationalization (A huge thank to rene-marc dolhen <rmd_at_mecreant.org> who achieved that big task)
    99
    10 2.0.9 (2006-07-30)
     102.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)
    1114- Fix various screen corruption for 'Configure LVM'/RAID sync (Andree Leidenfrost)
    1215- 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)
    1417- 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)
    1520- 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)
    1625- Replaced all occurrences of egrep with 'grep -E' and of fgrep with 'grep -F' (Andree Leidenfrost)
    1726- Optimize grep usage - fixes Debian bug #222052 (Andree Leidenfrost)
  • trunk/mondo/README

    r270 r764  
    2828
    2929You can get the latest packages from
    30 http://developer.berlios.de/project/showfiles.php?group_id=2524.
     30ftp://ftp.mondorescue.org
    3131
    3232Please see file 'INSTALL' for instructions about how to build and install
     
    5050
    5151Apart 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.
     52contents at the following URL: http://www.mondorescue.org/cgi-bin/trac.cgi/wiki
    5353
    5454Also, there is a mailing list mondo-devel@lists.sourceforge.net. Please go to
  • trunk/mondo/distributions/gentoo/mondo.ebuild

    r588 r764  
    99DESCRIPTION="The premier GPL disaster recovery solution."
    1010HOMEPAGE="http://www.mondorescue.org"
    11 SRC_URI="ftp://ftp.mondorecue.org/src/${PN/-rescue/}-${PV}-${PR}.tgz"
     11SRC_URI="ftp://ftp.mondorescue.org/src/${PN/-rescue/}-${PV}.tar.gz"
    1212
    1313LICENSE="GPL-2"
     
    2929    >=sys-boot/syslinux-1.52"
    3030
    31 S=${WORKDIR}/${PN/-rescue/}-${PV}-${PR}
     31S=${WORKDIR}/${PN/-rescue/}-${PV}
    3232
    3333src_unpack() {
  • trunk/mondo/distributions/mandriva/spec.m4

    r729 r764  
    22dnl
    33dnl SSS is replaced by the source package format
    4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-TTT.tar.bz2')dnl
     4define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl
    55dnl DDD is replaced by the list of dependencies specific to that distro
    66define(`DDD', )dnl
  • trunk/mondo/distributions/redhat/spec.m4

    r729 r764  
    22dnl
    33dnl SSS is replaced by the source package format
    4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-TTT.tar.gz')dnl
     4define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.gz')dnl
    55dnl DDD is replaced by the list of dependencies specific to that distro
    66define(`DDD', )dnl
  • trunk/mondo/distributions/rpm/mondo.spec

    r729 r764  
    33#
    44
    5 %define addreq  mindi >= 1.0.7, bzip2 >= 0.9, afio, mkisofs, binutils, newt >= 0.50, DDD
     5%define addreq  mindi >= 1.0.9, bzip2 >= 0.9, afio, mkisofs, binutils, newt >= 0.50, DDD
    66
    77Summary:    A program which a Linux user can utilize to create a rescue/restore CD/tape
  • trunk/mondo/distributions/suse/spec.m4

    r729 r764  
    22dnl
    33dnl SSS is replaced by the source package format
    4 define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}-TTT.tar.bz2')dnl
     4define(`SSS', `ftp://ftp.mondorescue.org/src/%{name}-%{version}.tar.bz2')dnl
    55dnl DDD is replaced by the list of dependencies specific to that distro
    66define(`DDD', `, buffer, cdrecord')dnl
  • trunk/mondo/mondo/Makefile.am

    r729 r764  
    44pkgdata_DATA   = do-not-compress-these
    55scriptdir      = $(pkgdatadir)
    6 script_DATA    = autorun
    7 
    8 install-data-hook:
    9     @for prog in $(script_DATA); do \
    10       chmod +x $(scriptdir)/$$prog; \
    11     done
     6script_SCRIPTS    = autorun
  • trunk/mondo/mondo/common/libmondo-files.c

    r689 r764  
    10581058
    10591059    /*@ buffers ******** */
    1060     char *outfile = NULL;
    10611060    char *nfs_dev = NULL;
    10621061    char *nfs_mount = NULL;
     
    10711070    /*@ pointers ***** */
    10721071    char *p;
    1073     FILE *fout;
    1074 
    1075 
    10761072
    10771073    log_it("Storing NFS configuration");
     
    11231119            ("Unable to find ethN (eth0, eth1, ...) adapter via NFS mount you specified.");
    11241120    }
    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);
    11721121    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);
    11811122
    11821123    asprintf(&tmp, "%s/NFS-DEV", bkpinfo->tmpdir);
  • trunk/mondo/mondo/common/newt-specific.c

    r688 r764  
    14571457
    14581458        /*@ int ************************************************************* */
    1459         int i = 0;
    14601459        int currline = 0;
    14611460        int finished = FALSE;
     1461
     1462        /*@ long ************************************************************ */
     1463        long i = 0;
    14621464        long lng = 0;
    14631465
     
    15041506        }
    15051507        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."),
    15071509                 i);
    15081510        newtPushHelpLine(differ_sz);
  • trunk/mondo/mondo/mondorestore/mondo-prep.c

    r729 r764  
    21902190#else
    21912191    asprintf(&program, "raidstart %s", raid_device);
    2192 //      sprintf (program, "raidstart " RAID_DEVICE_STUB "*");
    21932192#endif
    21942193    log_msg(1, "program = %s", program);
  • trunk/mondo/mondo/mondorestore/mondo-rstr-newt.c

    r729 r764  
    883883    static int lines_in_flist_window = 0;
    884884    static int depth = 0;
    885     int i = 0;
     885
     886    /** long **************************************************************/
     887    long i = 0;
    886888
    887889    /** structures *******************************************************/
     
    13631365    paranoid_free(size_str);
    13641366
    1365     newtListboxSetEntry(listbox, (int) keylist[currline],
     1367    newtListboxSetEntry(listbox, (long) keylist[currline],
    13661368                        mountlist_entry_to_string(mountlist, currline));
    13671369    /* if new /dev/md RAID device then do funky stuff */
     
    24892491{
    24902492
    2491     /** int *************************************************************/
    2492     int i = 0;
     2493    /** long **************************************************************/
     2494    long i = 0;
    24932495
    24942496    assert(disklist != NULL);
     
    25212523{
    25222524
    2523     /** int **************************************************************/
    2524     int i = 0;
     2525    /** long **************************************************************/
     2526    long i = 0;
    25252527
    25262528    assert(mountlist != NULL);
     
    25542556{
    25552557
    2556     /** int **************************************************************/
    2557     int i = 0;
     2558    /** long *************************************************************/
     2559    long i = 0;
    25582560
    25592561    /** buffers **********************************************************/
     
    25902592                void *keylist[], newtComponent listbox)
    25912593{
    2592     /** int *************************************************************/
    2593     int i = 0;
     2594    /** long ************************************************************/
     2595    long i = 0;
    25942596
    25952597    /** buffers *********************************************************/
  • trunk/mondo/mondo/mondorestore/mondo-rstr-tools.c

    r729 r764  
    21552155    asprintf(&command, "mount /dev/fd0u1722 %s", mountpt);
    21562156    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) &",
    21582158            command);
    21592159    log_msg(1, "tmp = '%s'", tmp);
  • trunk/tools/DISTROS

    r649 r764  
    1111suse_10.1
    1212sles_9
    13 gentoo_2006
     13sles_10
     14debian_3.1
     15gentoo_1.6
    1416slackware_10.2
    15 debian_3.1
  • trunk/tools/build2pkg

    r729 r764  
    88#
    99
    10 umask 022
     10(
    1111dname=`dirname $0`
    1212prem=`echo $dname |cut -c1`
     
    5555    src=${TOPDIR}/${VER}-$TAG/$p-[1-9st]*.tar.gz
    5656    pv=`basename $src .tar.gz`
     57    PVER=`echo $pv | sed "s|^$p-||" | cut -d- -f1`
    5758
    5859    if [  _"$dtype" = _"rpm" ]; then
     
    6970        log=$TMP/$p-rpm.log
    7071
    71         if [ "$dfam" = "mandriva" || "$dfam" = "suse" ]; then
    72             echo "Generating bzip2 files ($dfam)"
    73             gzip -cd $src | bzip2 -c3 > SOURCES/$pv.tar.bz2
     72        if [ "$dfam" = "mandriva" ] || [ "$dfam" = "suse" ]; then
     73            echo "Using bzip2 files ($dfam)"
     74            ln -sf $pv.tar.bz2 SOURCES/
    7475        else
     76            echo "Using gzip files ($dfam)"
    7577            ln -sf $src SOURCES/
    7678        fi
    7779        echo "Generating $p RPMS"
    7880        cd SPECS
    79         tar xfz $src $p-${VER}/distributions/${ddir}-$dver/$p.spec
    80         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}
    8284
    83         rpmbuild -ba $p.spec 2> $log 1> $log
     85        rpmbuild -ba $p.spec 2>&1 | tee $log
    8486        if [ $? != 0 ]; then
    85             cat $log
    8687            status=-1
    8788        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
    9094        fi
    9195        rm -rf ${TOPBUILDDIR}/BUILD/*
     
    9397    elif [  _"$dtype" = _"ebuild" ]; then
    9498        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
    97100        if [ _"`grep $TOPBUILDDIR/portage /etc/make.conf`" = _"" ]; then
    98101            echo "Adding $TOPBUILDDIR/portage to /etc/make.conf"
     
    101104
    102105        mkdir -p ${TOPBUILDDIR}/portage/sys-apps/$p
    103         mv $p-${VER}/distributions/${ddir}-$dver/$p-${VER}.ebuild ${TOPBUILDDIR}/portage/sys-apps/$p
    104         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}
    105108
    106109        cd ${TOPBUILDDIR}/portage/sys-apps/$p
    107         ebuild $p-${VER}.ebuild digest 2> $log 1> $log
     110        ebuild $p-${PVER}.ebuild digest 2> $log 1> $log
    108111        if [ $? != 0 ]; then
    109112            cat $log
    110113            status=-1
    111114        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
    123116        if [ $? != 0 ]; then
    124117            cat $log
     
    130123        cd $TOPBUILDDIR
    131124        tar xfz $src
    132         cd ${p}-${VER}
     125        cd ${p}-${PVER}
    133126        # point to the right debian conf
    134127        ln -s distributions/${ddir}-$dver debian
     
    149142    fi
    150143fi
     144) 2>&1 | tee /tmp/build2pkg.log
  • trunk/tools/build2qemu

    r729 r764  
    1313# Syntax: build2qemu [version-tag [vm1]..|vmx]]
    1414
    15 umask 022
     15(
    1616dname=`dirname $0`
    1717prem=`echo $dname |cut -c1`
     
    8282        sleep 300
    8383    fi
    84     scp -P $sp $TMP/mkmondo.tar.gz bruno@localhost:
     84    scp -P $sp $TMP/mkmondo.tar.gz ~/.rpmmacros ~/.rpmrc bruno@localhost:
    8585    rdate=`date "+%m%d%H%M"`
    8686    ssh -p $sp root@localhost "date $rdate"
     
    100100# Should be removed at the end
    101101rm -rf $TMP
     102) 2>&1 | tee /tmp/build2qemu.log
  • trunk/tools/common-env

    r729 r764  
    1111mkdir -p ${TOPDIR}
    1212export TMPDIR=/tmp
    13 export TMP=`mktemp -d`
     13export TMP=`mktemp -d /tmp/mondobuild.XXXXXXXXXX`
    1414
    1515umask 022
  • trunk/tools/distro-env

    r672 r764  
    7272    dfam="gentoo"
    7373    dtype="ebuild"
    74     suf=".${ddir}${dver}"
     74    dver1=`echo ${dver} | sed "s/\.//"`
     75    suf=".${ddir}${dver1}"
    7576    BUILDDIR=${TOPDIR}/ebuild
    7677elif [ $ddir = "slackware" ]; then
  • trunk/tools/file2ftp

    r592 r764  
    55# $Id$
    66#
     7
     8(
    79
    810dname=`dirname $0`
     
    4446
    4547for 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"
    4751done
     52
    4853
    4954echo "Sources delivery to ${ACCOUNT}:${DSTDIR}/src"
     
    5661    lftp -e "cd ${FTPDIR} ; put ${src} ; quit" ${FTPSERV}
    5762fi
     63) 2>&1 | tee /tmp/file2ftp.log
  • trunk/tools/mkannounce

    r672 r764  
    3030TAG=`echo $LAST | cut -d- -f2`
    3131
    32 SEARCH=`echo $LAST | cut -c2-`
     32SEARCH=`echo $VER | cut -c2-`
    3333
    3434rm -f $TMP/announce.tmp
    3535cat > $TMP/announce.tmp << EOF
    36 MondoRescue $LAST is now available</p>
     36MondoRescue $VER is now available</p>
    3737
    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>
    3939<p>
    4040Now available at <a href="ftp://ftp.mondorescue.org/">ftp://ftp.mondorescue.org/
  • trunk/tools/mknewversion

    r652 r764  
    88#
    99
    10 umask 022
    1110dname=`dirname $0`
    1211prem=`echo $dname |cut -c1`
  • trunk/tools/pkg2ftp

    r729 r764  
    66#
    77
     8
     9(
    810dname=`dirname $0`
    911prem=`echo $dname |cut -c1`
     
    5658            ar=$ARCH
    5759        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"
    6062    elif [  _"$dtype" = "_deb" ]; then
    61         pkg="$pkg ${TOPBUILDDIR}/$p_*.rpm"
     63        pkg="$pkg ${TOPBUILDDIR}/$p_*.deb"
    6264        spkg="$spkg ${TOPBUILDDIR}/$p_*.dsc ${TOPBUILDDIR}/$p_*.tar.gz"
    6365    fi
     
    6769ssh ${ACCOUNT} "mkdir -p ${DSTDIR}/${ddir}/${dver}"
    6870scp ${pkg} ${spkg} ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}
     71) 2>&1 | tee /tmp/pkg2ftp.log
  • trunk/tools/pkg2mdv

    r649 r764  
    66#
    77
     8(
    89dname=`dirname $0`
    910prem=`echo $dname |cut -c1`
     
    8283echo "Packages rebuild on ${DSTNODE}"
    8384ssh ${ACCOUNT} ${DSTNODE} "./mkmondo"
     85) 2>&1 | tee /tmp/pk2mdv.log
  • trunk/tools/qemu-vm.txt

    r649 r764  
    1 Booting CD
     1#Booting CD
    22qemu-img create -f qcow image.qemu 3G
    33qemu -cdrom /dev/hdc -m 256 -boot d image.qemu
    44
    55# 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
     6urpmi 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
    77
    88# gentoo
    9 Cf: http://wiki.xensource.com/xenwiki/QEMUGentoo
     9#Cf: http://wiki.xensource.com/xenwiki/QEMUGentoo
    1010emerge neon newt slang autoconf automake subversion libtool gcc wget vim man groff lynx grub afio buffer mindi mondo-rescue
    1111
    12 Changing CD during install:
     12#Changing CD during install:
    1313Ctrl-Alt-2
    1414eject cdrom
     
    1616change cdrom /dev/cdrom
    1717
    18 Boot single user pour change passwd root
    19 Clavier fr:
     18# Slack: put loadkeys fr in /etc/rc.d/rc.keymap
    2019
    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:
    3322mkdir /root/.ssh
    3423chmod 700 /root/.ssh
     
    3625chmod 600 /root/.ssh/authorized_keys
    3726
    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
    4228mkdir /users
    4329useradd bruno -d /users/bruno
     
    6046chmod 700 ~/.ssh
    6147scp -p victoria2.home.musique-ancienne.org:.ssh/id'*' ~/.ssh
     48# Passwd asked above
    6249cp ~/.ssh/id_dsa.pub ~/.ssh/authorized_keys
    6350chmod 600 ~/.ssh/authorized_keys
     
    6855EOF
    6956
    70 rebuild paquets necessaires mondo:
     57#rebuild paquets necessaires mondo:
    7158wget ftp://ftp.mondorescue.org/src/afio-2.4.7-1.src.rpm
    7259wget ftp://ftp.mondorescue.org/src/buffer-1.19-1.src.rpm
    7360rpm -ivh afio-2.4.7-1.src.rpm buffer-1.19-1.src.rpm
    74 mkdir -p build/BUILD build/RPMS/i386
     61mkdir -p build/BUILD build/RPMS/i386 build/SRPMS
    7562rpmbuild -ba build/SPECS/afio.spec
    7663rpmbuild -ba build/SPECS/buffer.spec
    7764chmod 644 build/RPMS/i386/*
    78 scp -p build/RPMS/i386/afio-[0-9]* build/RPMS/i386/buffer-[0-9]* ftp.mondorescue.org:/mondo/ftp/rhel/3/
     65scp -p build/RPMS/i?86/afio-[0-9]* build/RPMS/i?86/buffer-[0-9]* ftp.mondorescue.org:/mondo/ftp/rhel/3/
    7966
    8067
    8168root:
    82 rpm -ivh ~bruno/RPMS/RPMS/i386/afio-[0-9]* ~bruno/RPMS/RPMS/i386/buffer-[0-9]*
     69rpm -ivh ~bruno/build/RPMS/i?86/afio-[0-9]* ~bruno/build/RPMS/i?86/buffer-[0-9]*
     70# In case
     71scp bruno@10.0.2.2:/usr/bin/man2dvi /usr/local/bin
    8372
    84 pour gentoo
     73#for gentoo
    8574chown bruno /etc/make.conf
    8675bruno in portage group
  • trunk/tools/svn2build

    r729 r764  
    66#
    77
     8(
    89dname=`dirname $0`
    910prem=`echo $dname |cut -c1`
     
    8283            rm -f $TMP/$p.spec
    8384        elif [ "$dtype" = "ebuild" ]; then
    84             m4 $TMP/mondorescue.mc $dest/distributions/$dfam/$p.ebuild > $dest/distributions/${ddir}-$dver/$p-$v-r$TAG.ebuild
     85            m4 $TMP/mondorescue.mc $dest/distributions/$dfam/$p.ebuild > $dest/distributions/${ddir}-$dver/$p-$v.ebuild
    8586        elif [ "$dtype" = "deb" ]; then
    8687            # To be developped
    8788            #m4 $TMP/mondorescue.mc $dest/distributions/$dfam/$p > /dev/null
    8889            cp -a $dest/distributions/$ddir/* $dest/distributions/${ddir}-$dver
     90            m4 $TMP/mondorescue.mc $dest/distributions/$ddir/rules > $dest/distributions/${ddir}-$dver/rules
    8991            $TOOLHOME/mkchangelog.pl $dtype $p $dest/distributions/${ddir}-$dver/changelog
    9092            if [ $? -ne 0 ]; then
     
    135137    # Finally creates the tar files
    136138    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
    140141done
    141142
     
    148149echo "${VER}-$TAG" > ${TOPDIR}/LAST
    149150exit 0
     151) 2>&1 | tee /tmp/svn2build.log
  • trunk/website/support.shtml

    r397 r764  
    1919    </ul></p>
    2020    <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>
    2222    <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>
    2323    <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="https://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="https://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>
    2626    <div class="h2-3">
    2727            <h2>Mondo Rescue Mailing Lists</h2>
  • trunk/website/top.shtml

    r404 r764  
    3636          <li <!--#if expr="\"$curpage\" = \"support.shtml\"" --> id="current" <!--#endif -->>
    3737          <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>
    3939          <li <!--#if expr="\"$curpage\" = \"thanks.shtml\"" --> id="current" <!--#endif -->>
    4040          <a href="/thanks.shtml" title="So many helped us. Many thanks" >Thanks</a></li>
Note: See TracChangeset for help on using the changeset viewer.