Changeset 2635


Ignore:
Timestamp:
May 17, 2010, 5:57:40 AM (9 years ago)
Author:
bruno
Message:

svn merge -r 2586:2634 svn+ssh://bruno@svn.mondorescue.org/mondo/svn/mondorescue/branches/2.2.9

  • Avoids error messages from stat in analyze-my-lvm
  • Avoid perl warning by removing non-exitent dirs from @INC in mindi-get-perl-modules r3744@localhost: bruno | 2010-03-16 01:44:33 +0100
    • Fix a bug on Mandriva modules analysis (at least) (Backport from mindi 2.1.0)
  • Try to improve exclusion of binded /proc mount with "none" fs type exclusion Cf: #397
  • Adds gmane mirror on the support page of the web site.
  • More website improvements based on Tom Metro feedbacks
  • Adds Nable ML archive
  • For gmane prefer the threaded view to the blog one.
  • Fix an initialization bug for network protocol in interactive mode (was NULL and not NFS by default)
  • Put an explicit notice of MondoRescue?'s license: GPLv2 or later (as per Hugo's notice in sources)
  • Adds tee to deplist
  • Fix #412 by supporting grub-install.unsupported for OpenSuSE and solving an issue with the parameter passed to grub for device which should be a device name, not a partition.
  • Fix #413 where list of devices was not re-initialized correctly in a loop (Michael Shapiro)
  • Fix #415 by avoiding integration of unknown devices report from pvscan (Mike Shapiro)
  • Fix #414 by adding a function GetPVsForLV to remove PVs from excluded LVs (Mike Shapiro)
  • Fixes for #414: remove comments from grub conf file if used and improve grub conf file generation
  • Fix a typo (Mike Shapiro)
  • Improved msg for USB device creation
  • Mondoarchive should not try to cerate a cmp binary if it doesn't exist.
  • Fix a bug on ia64 where the boot image generated was removed before use in mondo
  • Avoid to have multiple similar calls to mkisofs by using macros r3946@localhost: bruno | 2010-05-04 19:17:51 +0200
    • Solves an issue with usage of -V option in mkiofs wrongly placed
  • netfs_proto should be initialized in every case, not just in DR (should solve remaining NULL reports)
  • Integrate Michael Shapiro's patch on Xen Kernel support for RHEL 5 (only atm) and fixes #418 (Michael Shapiro)
  • Fox a typo in a Web page
  • Precise that GPL is v2+ (as per Hugo's wish)
  • Improve display of messages (removes extra \n) and replace a stract with "" with " ". trying to debug #421
  • Remove a wrong usage of mr_strcat with exclude_path in the 2.2.9 version (probably cause of #421)
  • Fix strcat call !
Location:
branches/2.2.10
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/analyze-my-lvm

    r2590 r2635  
    174174ListAllPhysicalVolumes() {
    175175    if [ $lvmversion = 2 ]; then
    176         $LVMCMD pvscan 2> /dev/null | grep 'PV' | awk '{print $2}' >  $MINDI_TMP/pv.tmp
     176        $LVMCMD pvscan 2> /dev/null | grep 'PV' | grep -v unknown | awk '{print $2}' >  $MINDI_TMP/pv.tmp
    177177    else
    178178        pvscan 2> /dev/null | grep '"' | cut -d'"' -f2  >  $MINDI_TMP/pv.tmp
     
    180180
    181181    rm -f $MINDI_TMP/pv.tmp2
    182     l=""
    183182    for d in `cat $MINDI_TMP/pv.tmp`; do
    184183        # Skip devices excluded, coming from mondoarchive
    185184        skip=0
     185        l=""
    186186        l="$l `mindi --readalllink $d`"
    187187        l="$l `GiveMapperOfdm $d`"
  • branches/2.2.10/mindi/deplist.d/base.conf

    r2587 r2635  
    7373/usr/bin/uniq
    7474/usr/bin/reset
     75/usr/bin/tee
    7576
    7677
  • branches/2.2.10/mindi/mindi

    r2623 r2635  
    5151    # If "yes" mindi will automatically use your own kernel.
    5252
     53KERNEL_IS_XEN="no"
     54    # If set to "no", the kernel is not a Xen kernel
     55    # If "yes", mindi will modify isolinux.cfg for the Xen kernel.
     56 
    5357MY_FSTAB=/etc/fstab
    5458TAPE_MODS="ht st osst ide-tape ide_tape"
     
    420424}
    421425
     426
     427FindMboot32Binary() {
     428    MBOOTC32=/usr/lib/syslinux/mboot.c32
     429    [ ! -e "$MBOOTC32" ] && MBOOTC32=/usr/lib/syslinux/mboot.c32
     430    [ ! -e "$MBOOTC32" ] && MBOOTC32=/usr/lib64/syslinux/mboot.c32
     431    [ ! -e "$MBOOTC32" ] && MBOOTC32=/usr/share/syslinux/mboot.c32
     432    [ ! -e "$MBOOTC32" ] && MBOOTC32=/usr/share/lib/syslinux/mboot.c32
     433    [ ! -e "$MBOOTC32" ] && MBOOTC32=/usr/share/lib64/syslinux/mboot.c32
     434    [ ! -e "$MBOOTC32" ] && MBOOTC32=`find / -name mboot.c32 | grep -x "/.*/mboot.c32"`
     435    [ ! -e "$MBOOTC32" ] && Die "Please install mboot.c32 first. If your syslinux RPM doesn't include mboot.c32, you may download an isolinux RPM from Mondo's website - go to http://www.mondorescue.com and click on 'Download'"
     436    LogFile "Found mboot.c32 at $MBOOTC32"
     437}
    422438
    423439FindIsolinuxBinary() {
     
    913929}
    914930
     931# Get PV's for an LV
     932GetPVsForLV() {
     933  if [ -n "$1" ]; then
     934    vg=`$LVMCMD lvdisplay $1 2>/dev/null |awk '/VG Name/{print $NF;exit}'`
     935    if [ -z "$vg" ]; then
     936      return
     937    fi
     938    $LVMCMD vgdisplay -v $vg 2>/dev/null | awk '/PV Name/{print $NF}'
     939  fi
     940}
     941
    915942
    916943MakeMountlist() {
     
    11491176                l="$l `$MINDI_LIB/analyze-my-lvm --givemapperofdm $d`"
    11501177            done
     1178
     1179            # Remove PVs from LVs excluded
     1180            l="$l `GetPVsForLV $current_partition`"
     1181
     1182            # We want a single unique list
    11511183            list_of_devices="`echo $l | sort -u`"
     1184
    11521185            for d in $MINDI_EXCLUDE_DEVS ; do
    11531186                if  [ "`echo " $list_of_devices " | grep " $d"`" != "" ]; then
     
    13171350    local i old_pwd
    13181351    if [ -z "$ISO_CMD" ]; then
    1319         LogIt "Neither mkisofs nor genisoimage found, unable to make CD image"
     1352        LogFile "Neither mkisofs nor genisoimage found, unable to make CD image"
    13201353        return
    13211354    fi
     
    13431376    MakeMessageFile > $MINDI_TMP/iso/message.txt
    13441377    cp $kernelpath $MINDI_TMP/iso/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mindi tmp ($MINDI_TMP/iso/vmlinuz). Did you run out of disk space?"
     1378    if [ $KERNEL_IS_XEN = "yes" ]; then
     1379        cp $xenkernelpath $MINDI_TMP/iso/xen.gz 2>> $LOGFILE || Die "Cannot copy xen.gz ($xenkernelpath) to mindi tmp ($MINDI_TMP/iso/xen.gz). Did you run out of disk space?"
     1380        cp $MBOOTC32 $MINDI_TMP/iso/mboot.c32  2>> $LOGFILE || Die "Cannot copy mboot.c32 ($MBOOTC32) to mindi tmp ($MINDI_TMP/iso/mboot.c32). Did you run out of disk space?"
     1381    fi
     1382
    13451383    cp $MINDI_TMP/initrd.img $MINDI_TMP/iso/initrd.img 2>> $LOGFILE || Die "Cannot copy initrd.img ($MINDI_TMP/initrd.img) to $MINDI_TMP/iso/initrd.img. Did you run out of disk space?"
    13461384    if [ _"$MONDO_SHARE" != _"" ]; then
     
    13621400    if [ "$ARCH" != "ia64" ] ; then
    13631401        if [ _"$MONDO_SHARE" != _"" ]; then
    1364             cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_CACHE 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_CACHE). Did you run out of disk space?"
     1402            if [ $KERNEL_IS_XEN = "no" ]; then
     1403                cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_CACHE 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_CACHE). Did you run out of disk space?"
     1404            else
     1405                cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt,mboot.c32,xen.gz} $MONDO_CACHE 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_CACHE). Did you run out of disk space?"
     1406            fi
    13651407            cp -f $MONDO_SHARE/autorun $MINDI_TMP/iso 2>> $LOGFILE
    13661408        fi
     
    13681410    else
    13691411        $ISO_CMD $ISO_OPT -V Mindi_Image -o $MINDI_CACHE/mindi.iso -b images/mindi-bootroot.$BOOT_SIZE.img -c images/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log
    1370         rm -f images/mindi-bootroot.$BOOT_SIZE.img
    13711412    fi
    13721413    if [ "$?" -ne "0" ] ; then
     
    13871428    local i
    13881429    if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ _"$MONDO_SHARE" = _"" ]; then
    1389         echo -n "Shall I make a bootable USB image ? (y/[n]) "
     1430        echo -n "Shall I make a bootable USB device ? (y/[n]) "
    13901431        read i
    13911432        [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0
     
    16171658                ps=""
    16181659            fi
    1619             outstr="label $i\n\tkernel ${ps}vmlinuz\n\tappend initrd=${ps}initrd.img root=/dev/ram0 rw ramdisk_size=$ramdisk_size ${ooo} $MINDI_ADDITIONAL_BOOT_PARAMS\n"
     1660            if [ $KERNEL_IS_XEN = "no" ]; then
     1661                outstr="label $i\n\tkernel ${ps}vmlinuz\n\tappend initrd=${ps}initrd.img root=/dev/ram0 rw ramdisk_size=$ramdisk_size ${ooo} $MINDI_ADDITIONAL_BOOT_PARAMS\n"
     1662            else
     1663                outstr="label $i\n\tkernel ${ps}mboot.c32\n\tappend ${ps}xen.gz --- ${ps}vmlinuz root=/dev/ram0 rw ramdisk_size=$ramdisk_size  ${ooo} $MINDI_ADDITIONAL_BOOT_PARAMS --- ${ps}initrd.img\n"
     1664            fi
    16201665        fi
    16211666        echo -en "$outstr"
    16221667    done
    1623 
    16241668    if [ -e "$MINDI_DATA/memtest.img" ] ; then
    16251669        if [ "$type" = "elilo" ]; then
     
    17081752    dd if=/dev/zero of=$mountpoint/zero bs=1k count=16 &> /dev/null
    17091753    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    1710     cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null
    1711     if [ "$?" -ne "0" ] ; then
     1754         
     1755    retval=0
     1756    if [ $KERNEL_IS_XEN = "no" ]; then
     1757        cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null
     1758        retval=$?
     1759    else
     1760        cp -f $xenkernelpath $mountpoint/xenkernel &> /dev/null
     1761        retval=$?
     1762        cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null
     1763        let retval+=$?
     1764    fi
     1765 
     1766    if [ "$retval" -ne "0" ] ; then
    17121767        LogFile "Files at mountpoint ($mountpoint) :-"
    17131768        du -sk $mountpoint/* >> $LOGFILE
     
    22002255    done
    22012256
     2257    rm -f $MINDI_TMP/ungzip.lis
    22022258    for i in `echo $needed_modules  | tr ' ' '\n' | sort -u`; do
    22032259        grep -qE '^$i$' $MINDI_TMP/cp.lis
     
    22062262            LogFile "Adding $i ($s KB) to the rootfs"
    22072263            echo $i >> $MINDI_TMP/cp.lis
     2264
     2265            # Uncompress modules if not using udev and native modprobe
     2266            if [ ! -f $mountpoint/tmp/USE-UDEV ]; then
     2267                if [ "`echo "$i" | grep -F ".gz"`" ]; then
     2268                    echo "$i" >> $MINDI_TMP/ungzip.lis
     2269                fi
     2270            fi
    22082271        fi
    22092272    done
     
    22562319    # Then copy files needed
    22572320    LANGUAGE=C tar cf - `cat $MINDI_TMP/cp.lis` 2> /dev/null | (cd $mountpoint ; tar xf - ) 2>&1 | grep -Ev "tar: Removing.*/\'" >> $LOGFILE
     2321
     2322    # Uncompress modules if not using udev and native modprobe
     2323    for f in `cat $MINDI_TMP/ungzip.lis`; do
     2324        echo "Uncompressing $f" >> $LOGFILE
     2325        gunzip -f $mountpoint/$f
     2326    done
     2327    rm -f $MINDI_TMP/ungzip.lis
    22582328
    22592329    # Then handle links
     
    25972667
    25982668        kernelpath=$4; [ "$kernelpath" = "(null)" ] && kernelpath=""
     2669        # See if it's a Xen kernel
     2670        if [ -n "$kernelpath" ]; then
     2671            strings $kernelpath | grep -iq xen 2>/dev/null
     2672            if [ $? -eq 0 ]; then
     2673                # It's a Xen kernel
     2674                KERNEL_IS_XEN=yes
     2675                LogFile "It's a Xen kernel..."
     2676                # WARNING: This will only work for RHEL 5
     2677                # TODO: SLES and others
     2678                # Use TryToFindKernelPath ?
     2679                xenkernelpath="/boot/`uname -r | awk '{sub("[Xx][Ee][Nn]",""); printf("xen.gz-%s",$0)}'`"
     2680                if [[ -z "$xenkernelpath" || ! -f "$xenkernelpath" ]]; then
     2681                    Die "Cannot find Xen kernel $xenkernelpath, aborting"
     2682                fi
     2683                xenkernelname=`basename $xenkernelpath`
     2684                FindMboot32Binary
     2685            fi
     2686        fi
     2687
    25992688###
    26002689### Sq-Modification...
     
    26022691### if module path is found then use it other wise use uname -r to set it...
    26032692###
     2693        if [ $KERNEL_IS_XEN = "yes" ]; then
     2694            LogAll "xenkernelpath = $xenkernelpath"
     2695            LogAll "xenkernelname = $xenkernelname"
     2696        fi
    26042697        kernelname=`echo $kernelpath | cut -d'-' -f2-`
    26052698        LogAll "kernelname = $kernelname"
  • branches/2.2.10/mindi/mindi-get-perl-modules

    r2183 r2635  
    2121
    2222my $require = process_file(@_);
     23
     24my @includes;
     25
     26# Remove non exiting directories from @INC
     27# and thus avoid perl warnings
     28#
     29foreach my $d (@INC) {
     30    push @includes,$d if (-d $d);
     31}
    2332
    2433find(
     
    3948        }
    4049    },
    41     @INC);
     50    @includes);
    4251
    4352return(\%files);
  • branches/2.2.10/mondo/README

    r2087 r2635  
    5555https://lists.sourceforge.net/lists/listinfo/mondo-devel for further
    5656information and the opportunity to subscribe to or unsubscribe from the list.
     57
     58License
     59=======
     60
     61This program is free software; you can redistribute it and/or modify
     62it under the terms of the GNU General Public License as published by
     63the Free Software Foundation; either version 2 of the License, or
     64(at your option) any later version.
     65
     66This license was given to MondoRescue by the original author Hugo Rabson, and is
     67continue its current maintainer Bruno Cornec.
     68
  • branches/2.2.10/mondo/src/common/libmondo-archive.c

    r2623 r2635  
    17111711        if (bkpinfo->nonbootable_backup) {
    17121712            log_msg(1, "Making nonbootable backup");
    1713 // FIXME --- change mkisofs string to MONDO_MKISOFS_NONBOOTABLE and add ' .' at end
    1714             res = eval_call_to_make_ISO("mkisofs -o '_ISO_' -r -p MondoRescue -publisher www.mondorescue.org -A MondoRescue_GPL -V _CD#_ .", destfile, g_current_media_number, message_to_screen);
     1713            res = eval_call_to_make_ISO(MONDO_MKISOFS"-o '_ISO_' -V _CD#_ .", destfile, g_current_media_number, MONDO_LOGFILE, message_to_screen);
    17151714        } else {
    17161715            log_msg(1, "Making bootable backup");
     
    17251724            if (bkpinfo->make_cd_use_lilo) {
    17261725                log_msg(1, "make_cd_use_lilo = TRUE");
    1727 // FIXME --- change mkisofs string to MONDO_MKISOFS_REGULAR_SYSLINUX/LILO depending on bkpinfo->make_cd_usE_lilo
    1728 // and add ' .' at end
    17291726#ifdef __IA64__
    17301727                log_msg(1, "IA64 --> elilo");
    1731                 res = eval_call_to_make_ISO("mkisofs -no-emul-boot -b images/mindi-bootroot." IA64_BOOT_SIZE ".img -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", destfile, g_current_media_number, message_to_screen);
     1728                res = eval_call_to_make_ISO(MONDO_MKISOFS_REGULAR_ELILO"-o '_ISO_' -V _CD#_ .", destfile, g_current_media_number, MONDO_LOGFILE, message_to_screen);
    17321729#else
    1733 // FIXME --- change mkisofs string to MONDO_MKISOFS_REGULAR_SYSLINUX/LILO depending on bkpinfo->make_cd_usE_lilo
    1734 // and add ' .' at end
    17351730                log_msg(1, "Non-ia64 --> lilo");
    1736                 res =
    1737                     eval_call_to_make_ISO("mkisofs -b images/mindi-bootroot.2880.img -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", destfile, g_current_media_number, message_to_screen);
     1731                    // FIXME: fixed boot size probably wrong. lilo to be removed
     1732                res = eval_call_to_make_ISO(MONDO_MKISOFS"-b images/mindi-bootroot.2880.img -c boot.cat -o '_ISO_' -J -V _CD#_ .", destfile, g_current_media_number, MONDO_LOGFILE, message_to_screen);
    17381733#endif
    17391734            } else {
    17401735                log_msg(1, "make_cd_use_lilo = FALSE");
    17411736                log_msg(1, "Isolinux");
    1742                 res = eval_call_to_make_ISO("mkisofs -no-emul-boot -b isolinux.bin -boot-load-size 4 -boot-info-table -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", destfile, g_current_media_number, message_to_screen);
     1737                res = eval_call_to_make_ISO(MONDO_MKISOFS_REGULAR_SYSLINUX"-o '_ISO_' -V _CD#_ .", destfile, g_current_media_number, MONDO_LOGFILE, message_to_screen);
    17431738            }
    17441739        }
  • branches/2.2.10/mondo/src/common/libmondo-devices.c

    r2623 r2635  
    120120
    121121    tmp = where_is_root_mounted();
    122     log_msg(0, "root is currently mounted at %s\n", tmp);
     122    log_msg(0, "root is currently mounted at %s", tmp);
    123123
    124124#ifdef __FreeBSD__
     
    18771877    while (DSFptr != NULL) {
    18781878        if (DSFptr->check) {
    1879             log_msg (4, "%s is mounted on %s and is on disk %s\n", DSFptr->device, DSFptr->mount_point, ndsf);
     1879            log_msg (4, "%s is mounted on %s and is on disk %s", DSFptr->device, DSFptr->mount_point, ndsf);
    18801880            strcat(*included_dsf_list, DSFptr->mount_point);
    18811881            strcat(*included_dsf_list, " ");
    18821882        } else {
    1883             log_msg (4, "%s is mounted on %s and is NOT on disk %s\n", DSFptr->device, DSFptr->mount_point, ndsf);
     1883            log_msg (4, "%s is mounted on %s and is NOT on disk %s", DSFptr->device, DSFptr->mount_point, ndsf);
    18841884            strcat(*excluded_dsf_list, DSFptr->mount_point);
    18851885            strcat(*excluded_dsf_list, " ");
     
    19211921        if (mode == 'E') {
    19221922            if (strlen(mounted_on_dsf)) {
    1923                 log_to_screen("Excluding the following file systems on %s:\n", token);
    1924                 log_to_screen("  %s\n", mounted_on_dsf);
     1923                log_to_screen("Excluding the following file systems on %s:", token);
     1924                log_to_screen("==> %s", mounted_on_dsf);
    19251925                log_msg (5, "Adding to bkpinfo->exclude_paths due to -E option: %s", mounted_on_dsf);
    19261926                mr_strcat(bkpinfo->exclude_paths, " %s ", mounted_on_dsf);
     
    19281928            }
    19291929        } else {
    1930             log_to_screen("Archiving only the following file systems on %s:\n", token);
    1931             log_to_screen("  %s\n", mounted_on_dsf);
    1932             strcpy(bkpinfo->include_paths, "/");
     1930            log_to_screen("Archiving only the following file systems on %s:", token);
     1931            log_to_screen("==> %s", mounted_on_dsf);
     1932            mr_free(bkpinfo->include_paths);
     1933            mr_asprintf(bkpinfo->include_paths, "%s", "/");
    19331934            if (strlen(not_mounted_on_dsf)) {
    19341935                log_msg (5, "Adding to bkpinfo->exclude_paths due to -I option: %s", not_mounted_on_dsf);
    1935                 log_to_screen("Not archiving the following file systems:\n");
    1936                 log_to_screen("  %s\n", not_mounted_on_dsf);
    1937                 mr_strcat(bkpinfo->exclude_paths, " %s ", mounted_on_dsf);
     1936                log_to_screen("Not archiving the following file systems:");
     1937                log_to_screen("==> %s", not_mounted_on_dsf);
     1938                mr_strcat(bkpinfo->exclude_paths, " %s ", not_mounted_on_dsf);
    19381939            }
    19391940        }
     
    27892790        /* Never try to eject a NETFS device */
    27902791        bkpinfo->please_dont_eject = TRUE;
     2792        /*  Force NFS to be the protocol by default */
     2793        if (bkpinfo->netfs_proto == NULL) {
     2794            mr_asprintf(bkpinfo->netfs_proto, "nfs");
     2795        }
    27912796
    27922797        /* Initiate bkpinfo netfs_mount path from running environment if not already done */
     
    28512856            mr_free(command);
    28522857
    2853             p = popup_and_get_string("Network protocol", "Which Network protocol should I use?", bkpinfo->netfs_proto);
    2854             if (p == NULL) {
    2855                 log_to_screen("User has chosen not to backup the PC");
    2856                 finish(1);
    2857             }
    2858             mr_free(bkpinfo->netfs_proto);
    2859             bkpinfo->netfs_proto = p;
    2860 
    2861             p = popup_and_get_string("Network share", "Which remote Network share should I mount?", bkpinfo->netfs_mount);
    2862             if (p == NULL) {
    2863                 log_to_screen("User has chosen not to backup the PC");
    2864                 finish(1);
    2865             }
    2866             mr_free(bkpinfo->netfs_mount);
    2867             bkpinfo->netfs_mount = p;
    2868         }
     2858        }
     2859        p = popup_and_get_string("Network protocol", "Which Network protocol should I use?", bkpinfo->netfs_proto);
     2860        if (p == NULL) {
     2861            log_to_screen("User has chosen not to backup the PC");
     2862            finish(1);
     2863        }
     2864        mr_free(bkpinfo->netfs_proto);
     2865        bkpinfo->netfs_proto = p;
     2866
     2867        p = popup_and_get_string("Network share", "Which remote Network share should I mount?", bkpinfo->netfs_mount);
     2868        if (p == NULL) {
     2869            log_to_screen("User has chosen not to backup the PC");
     2870            finish(1);
     2871        }
     2872        mr_free(bkpinfo->netfs_mount);
     2873        bkpinfo->netfs_mount = p;
     2874
    28692875        /* Initiate bkpinfo isodir path from running environment if mount already done */
    28702876        mr_free(bkpinfo->isodir);
  • branches/2.2.10/mondo/src/common/libmondo-filelist.c

    r2623 r2635  
    13581358#if linux
    13591359        // 2.6 has /sys as a proc-type thing -- must be excluded
    1360         mr_asprintf(strtmp, "find '%s' -fstype mvfs -prune -o -fstype devpts -prune -o -fstype tmpfs -prune -o -fstype proc -prune -o -fstype sysfs -prune -o -fstype rpc_pipefs -prune -o %s -type d -print > %s 2> /dev/null", dir, find_excludes, g_skeleton_filelist);
     1360        mr_asprintf(strtmp, "find '%s' -fstype mvfs -prune -o -fstype devpts -prune -o -fstype tmpfs -prune -o -fstype proc -prune -o -fstype sysfs -prune -o -fstype rpc_pipefs -prune -o -fstype none -prune -o %s -type d -print > %s 2> /dev/null", dir, find_excludes, g_skeleton_filelist);
    13611361#else
    13621362        // On BSD, for example, /sys is the kernel sources -- don't exclude
  • branches/2.2.10/mondo/src/common/libmondo-tools.c

    r2607 r2635  
    514514
    515515        if (bkpinfo->nonbootable_backup) {
    516             mr_asprintf(mondo_mkisofs_sz, MONDO_MKISOFS_NONBOOT);
     516            mr_asprintf(mondo_mkisofs_sz, MONDO_MKISOFS);
    517517        } else if
    518518#ifdef __FreeBSD__
     
    523523#ifdef __IA64__
    524524    {
    525         mr_asprintf(mondo_mkisofs_sz, MONDO_MKISOFS_REGULAR_ELILO);
     525        mr_asprintf(mondo_mkisofs_sz, "%s -V _CD#_", MONDO_MKISOFS_REGULAR_ELILO);
    526526    }
    527527#else
    528528    {
    529         mr_asprintf(mondo_mkisofs_sz, MONDO_MKISOFS_REGULAR_LILO);
     529        mr_asprintf(mondo_mkisofs_sz, "%s -V _CD#_", MONDO_MKISOFS_REGULAR_LILO);
    530530    }
    531531#endif
    532         else {
    533             mr_asprintf(mondo_mkisofs_sz, MONDO_MKISOFS_REGULAR_SYSLINUX);
     532        else
     533        {
     534            mr_asprintf(mondo_mkisofs_sz, "%s -V _CD#_", MONDO_MKISOFS_REGULAR_SYSLINUX);
    534535        }
    535536
     
    950951    }
    951952
    952     tmp = find_home_of_exe("cmp");
    953     if (!tmp) {
    954         mr_free(tmp);
    955         tmp = find_home_of_exe("true");
    956         if (!tmp) {
    957             retval += whine_if_not_found("cmp");
    958         } else {
    959             log_to_screen("Your system lacks the 'cmp' binary. I'll create a dummy cmp for you.");
    960             if (run_program_and_log_output("cp -f `which true` /usr/bin/cmp", 0)) {
    961                 mr_free(tmp);
    962                 fatal_error("Failed to create dummy 'cmp' file.");
    963             }
    964         }
    965     }
    966     mr_free(tmp);
     953    if (!find_home_of_exe("cmp")) {
     954        whine_if_not_found("cmp");
     955    }
    967956
    968957    run_program_and_log_output("umount `mount | grep cdr | cut -d' ' -f3 | tr '\n' ' '`", 5);
  • branches/2.2.10/mondo/src/include/my-stuff.h

    r2508 r2635  
    174174
    175175
    176 /**
    177  * @c mkisofs command to generate a nonbootable CD, except for -o option and the directory to image.
    178  */
    179 #define MONDO_MKISOFS_NONBOOT   "mkisofs -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL_Version -V _CD#_"
     176#define MONDO_MKISOFS "mkisofs -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL_Version "
    180177
    181178/**
    182179 * @c mkisofs command to generate a bootable CD using isolinux, except for -o option and the directory to image.
    183180 */
    184 #define MONDO_MKISOFS_REGULAR_SYSLINUX  "mkisofs -J -boot-info-table -no-emul-boot -b isolinux.bin -c boot.cat -boot-load-size 4 -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL_Version -V _CD#_"
     181#define MONDO_MKISOFS_REGULAR_SYSLINUX  MONDO_MKISOFS"-J -boot-info-table -no-emul-boot -b isolinux.bin -c boot.cat -boot-load-size 4 "
    185182
    186183/**
    187184 * @c mkisofs command to generate a bootable CD using LILO, except for -o option and the directory to image.
    188185 */
    189 #define MONDO_MKISOFS_REGULAR_LILO      "mkisofs -boot-info-table -no-emul-boot -b isolinux.bin -c boot.cat -boot-load-size 4 -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_"
     186#define MONDO_MKISOFS_REGULAR_LILO      MONDO_MKISOFS_REGULAR_SYSLINUX
    190187
    191188/**
    192189 * @c mkisofs command to generate a bootable CD using ELILO, except for -o option and the directory to image.
    193190 */
    194 // Should replace 8192 by IA64_BOOT_SIZE
    195 #define MONDO_MKISOFS_REGULAR_ELILO      "mkisofs -no-emul-boot -b images/mindi-bootroot.8192.img -c boot.cat -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_"
     191#define MONDO_MKISOFS_REGULAR_ELILO      MONDO_MKISOFS"-J -no-emul-boot -b images/mindi-bootroot."IA64_BOOT_SIZE".img -c boot.cat "
    196192
    197193/**
  • branches/2.2.10/mondo/src/restore-scripts/mondo/grub-MR

    r2508 r2635  
    6969
    7070    echo -en "\
    71     device (hd$driveno) $mbrpart\n\
     71    device (hd$driveno) $mbrdev\n\
    7272    $extraline\n\
    7373    root (hd$driveno,$partno)\n\
     
    7777    log_file=/tmp/grub.output
    7878    if [ "$MNT_RESTORING" ] ; then
    79         chroot /mnt/RESTORING grub --batch < /tmp/feed.txt > $log_file
     79        chroot $MNT_RESTORING grub --batch < /tmp/feed.txt > $log_file
    8080    else
    8181        grub --batch < /tmp/feed.txt > $log_file
     
    104104
    105105echo "Now I'll use grub-install" >> $LOGFILE
    106 chroot /mnt/RESTORING grub-install $1 >> $LOGFILE
    107 res=$?
     106if [ "$MNT_RESTORING" ] ; then
     107    chroot $MNT_RESTORING grub-install $1 2>&1 | tee -a  $LOGFILE
     108    res=$?
     109else
     110    grub-install $1 2>&1 | tee -a $LOGFILE
     111    res=$?
     112fi
    108113echo "grub-install returned $res" >> $LOGFILE
    109114[ "$res" -eq "0" ] && exit 0
    110115
     116# For some OpenSuSE
     117echo "Now I'll use grub-install.unsupported" >> $LOGFILE
     118if [ "$MNT_RESTORING" ] ; then
     119    chroot $MNT_RESTORING grub-install.unsupported $1 2>&1 | tee -a $LOGFILE
     120    res=$?
     121else
     122    grub-install.unsupported $1 2>&1 | tee -a $LOGFILE
     123    res=$?
     124fi
     125echo "grub-install.unsupported returned $res" >> $LOGFILE
     126[ "$res" -eq "0" ] && exit 0
     127
    111128echo "Trying a hack" >> $LOGFILE
    112 FindBootPart $1 $2
    113 mbrpart=$1
     129FindBootPart $1 $2 2>&1 | tee -a $LOGFILE
     130mbrdev=`echo $1 | sed 's/\([^0-9]*\)[0-9]*$/\1/'`
    114131if echo $bootpart | grep "/cciss/" > /dev/null ; then
    115132    partno=`basename $bootpart | cut -d'p' -f2`
     133    mbrdev=`echo $mbrdev | cut -d'p' -f1`
    116134elif echo $bootpart | grep "/mapper/mpath" > /dev/null ; then
    117135    partno=`basename $bootpart | cut -d'p' -f3`
     136    mbrdev=`echo $mbrdev | cut -d'p' -f1`
    118137else
    119     partno=`basename $bootpart | sed s/[a-z]*//`
     138    partno=`basename $bootpart | sed 's/[a-z]*//'`
    120139fi
    121140if [ ! "$partno" ] ; then
     
    125144fi
    126145if echo $bootpart | grep "/md" > /dev/null ; then
     146    # FIXME: Why this if not used later
    127147    base=`basename $bootpart`
    128148    line=`grep $base /proc/mdstat | head -n1`
    129     echo "mbrpart was $mbrpart"
    130     mbrpart=`parted2fdisk -l | grep /dev/ | head -n1 | tr ':' ' ' | cut -d' ' -f2`
    131     echo "mbrpart is $mbrpart"
     149    echo "mbrdev was $mbrdev" 2>&1 | tee -a $LOGFILE
     150    mbrdev=`parted2fdisk -l | grep /dev/ | head -n1 | tr ':' ' ' | cut -d' ' -f2`
     151    echo "mbrdev is $mbrdev" 2>&1 | tee -a $LOGFILE
    132152    partno="0"; # cheating - FIXME   
    133153fi
    134 echo ".............Cool."
     154echo ".............Cool." 2>&1 | tee -a $LOGFILE
    135155
    136156grub=`FindPathOfRESTExe grub`
     
    142162for driveno in 0 1 2 ; do
    143163    try_grub_hack $driveno $partno "" >> $LOGFILE 2>> $LOGFILE && break
    144     try_grub_Hack $driveno $partno "find $BOOTPATHNAME/stage1" >> $LOGFILE 2>> $LOGFILE && break
     164    try_grub_hack $driveno $partno "find $BOOTPATHNAME/stage1" >> $LOGFILE 2>> $LOGFILE && break
    145165done
    146166res=$?
     
    152172echo "Now I'll use grub-install.patched" >> $LOGFILE
    153173cp -f `which grub-install.patched` /mnt/RESTORING/sbin
    154 chroot /mnt/RESTORING grub-install.patched $1 >> $LOGFILE
     174chroot /mnt/RESTORING grub-install.patched $1 2>&1 | tee -a $LOGFILE
    155175res=$?
    156176echo "grub-install.patched returned $res" >> $LOGFILE
     
    160180
    161181if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ]; then
    162     GRUBCFGFILE=/boot/grub/menu.lst
     182    grep -vE '^#' /boot/grub/menu.lst > /mnt/RESTORING/tmp/grub.conf
    163183elif [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ]; then
    164     GRUBCFGFILE=/boot/grub/grub.cfg
     184    grep -vE '^#' /boot/grub/grub.cfg > /mnt/RESTORING/tmp/grub.conf
    165185else
    166     echo "Unable to find Grub conf file"
     186    echo "Unable to find Grub conf file" | tee -a $LOGFILE
    167187    exit -1
    168188fi
    169 echo "Trying to use the existing $GRUBCFGFILE file in batch mode" >> $LOGFILE
    170 chroot /mnt/RESTORING grub --batch < /mnt/RESTORING$GRUBCFGFILE
     189echo "Trying to use the existing grub conf file in batch mode" >> $LOGFILE
     190cat /mnt/RESTORING/tmp/grub.conf >> $LOGFILE
     191chroot /mnt/RESTORING grub --batch < /mnt/RESTORING/tmp/grub.conf
    171192res=$?
    172 echo "$GRUBCFGFILE approach returned $res" >> $LOGFILE
     193echo "grub conf file approach returned $res" >> $LOGFILE
     194rm -f /mnt/RESTORING/tmp/grub.conf
    173195[ "$res" -eq "0" ] && exit 0
    174196
  • branches/2.2.10/tools/quality

    r2508 r2635  
    2828
    2929# How many sprintf/strcat/strcpy vs asprintf are they
    30 for s in asprintf mr_asprintf sprintf snprintf strcat strncat strcpy strncpy fgets malloc mr_malloc malloc_string getline mr_getline ARBITRARY_MAXIMUM MAX_TAPECATALOG_ENTRIES MAX_MOUNTLIST_ENTRIES MAXIMUM_RAID_DEVS MAXIMUM_ADDITIONAL_RAID_VARS MAXIMUM_DISKS_PER_RAID_DEV MAX_TAPECAT_FNAME_LEN MAX_NOOF_MEDIA MAX_NEWT_COMMENT_LEN MAX_NOOF_SETS_HERE MAX_STR_LEN getcwd goto free mr_free paranoid_free paranoid_system mr_system assert static; do
     30for s in asprintf mr_asprintf sprintf snprintf strcat strncat mr_strcat strcpy strncpy fgets malloc mr_malloc malloc_string getline mr_getline ARBITRARY_MAXIMUM MAX_TAPECATALOG_ENTRIES MAX_MOUNTLIST_ENTRIES MAXIMUM_RAID_DEVS MAXIMUM_ADDITIONAL_RAID_VARS MAXIMUM_DISKS_PER_RAID_DEV MAX_TAPECAT_FNAME_LEN MAX_NOOF_MEDIA MAX_NEWT_COMMENT_LEN MAX_NOOF_SETS_HERE MAX_STR_LEN getcwd goto free mr_free paranoid_free paranoid_system mr_system assert static; do
    3131    echo "mondorescue $s usage : "
    3232    tot=0
  • branches/2.2.10/website/about.shtml

    r2129 r2635  
    6565      co-development, maintenance, Official Debian packager</P>
    6666      <P ALIGN=CENTER>
     67      <I><B>Victor Gattegno</B></I><BR>
     68      Mailing list support, contributor</P>
     69      <P ALIGN=CENTER>
     70      <I><B>Michael Shapiro</B></I><BR>
     71      Code contributor</P>
     72      <P ALIGN=CENTER>
     73      <I><B>Lester Wade</B></I><BR>
     74      Documentation contributor</P>
     75      <P ALIGN=CENTER>
    6776      <I><B>Lars Rupp</B></I><BR>
    6877      Offical SuSE packager</P>
    69       <P ALIGN=CENTER>
    70       <I><B>Mike Roark</B></I><BR>
    71       Contributor SuSE packager</P>
    7278      <p></p>
    7379  <div class="h2-4">
     
    97103       <I>Mikael Hultgren, Michael Clark, Scott Godin</I><BR>
    98104       major contributors</P>
     105      <P ALIGN=CENTER>
     106      <I>Mike Roark</I><BR>
     107      Contributor SuSE packager</P>
    99108  <div class="h2-2">
    100109          <h2>Artwork of this site</h2>
  • branches/2.2.10/website/docs.shtml

    r2505 r2635  
    6161          <li>A Mondo Rescue <a href="http://trac.mondorescue.org/browser/branches/stable/mondo-doc/mondo-presentation.odp" target="_blank">presentation</a> made by Bruno Cornec. (Older versions also available: <a href="/docs/mondo-presentation-v1.pdf" target="_blank">v1</a>,<a href="/docs/mondo-presentation-v2.pdf" target="_blank">v2</a>)
    6262          <li><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a> <span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type"><a href="http://www.mondorescue.org/docs/p2v.pdf">Linux P2V migrations using MondoRescue</a></span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://opensource.hp.com" property="cc:attributionName" rel="cc:attributionURL">Lester Wade</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dc="http://purl.org/dc/elements/1.1/" href="/docs/p2v.odt" rel="dc:source">trac.mondorescue.org</a>.
    63           <li><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a> <span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type">The <a href="/docs/LabMondoRescue.pdf" target="_blank">MondoRescue Lab</a></span>: Experience yourself MondoRescue by following those Lab instructions ! Should provide you with at least 2 hours of fun discovering the tool with detailed explanations. This Lab has been developed for an internal HP Open Source and Linux Event I contributed to organize (TES 2009). Highly receommended to have a good tour of the features. By <a xmlns:cc="http://creativecommons.org/ns#" href="http://opensource.hp.com" property="cc:attributionName" rel="cc:attributionURL">Bruno Cornec</a> and licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dc="http://purl.org/dc/elements/1.1/" href="/docs/LabMondoRescue.odt" rel="dc:source">trac.mondorescue.org</a>.
     63          <li><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a> <span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type">The <a href="/docs/LabMondoRescue.pdf" target="_blank">MondoRescue Lab</a></span>: Experience yourself MondoRescue by following those Lab instructions ! Should provide you with at least 2 hours of fun discovering the tool with detailed explanations. This Lab has been developed for an internal HP Open Source and Linux Event I contributed to organize (TES 2009). Highly recommended to have a good tour of the features. By <a xmlns:cc="http://creativecommons.org/ns#" href="http://opensource.hp.com" property="cc:attributionName" rel="cc:attributionURL">Bruno Cornec</a> and licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dc="http://purl.org/dc/elements/1.1/" href="/docs/LabMondoRescue.odt" rel="dc:source">trac.mondorescue.org</a>.
    6464          <li>A now obsoleted by the previous Mondo Rescue hardware migration (including P2V with VMWare) <a href="/docs/hwmigration.pdf" target="_blank">guide</a> made by Gallig Renaud, Eric Montaut and François-Xavier Horel. (<a href="/docs/HOWTO-_Deploy_Linux_from_SCSI_to_SATA.pdf" target="_blank">previous version</a>)
    6565
  • branches/2.2.10/website/downloads.shtml

    r2610 r2635  
    1515    <a href="/thanks.shtml">contributors</a>, delivered under the GPL.</p>
    1616    <p>
    17 This program is <a href="http://www.fsf.org/philosophy/free-sw.html">free software</a>; you can redistribute it and/or modify it under the terms of the <a href="http://www.fsf.org/copyleft/gpl.html">GNU General Public License</a> version 2, as published by the <a href="http://www.fsf.org/">Free Software Foundation</a>.<br/>
     17This program is <a href="http://www.fsf.org/philosophy/free-sw.html">free software</a>; you can redistribute it and/or modify it under the terms of the <a href="http://www.fsf.org/copyleft/gpl.html">GNU General Public License</a> version 2 or later, as published by the <a href="http://www.fsf.org/">Free Software Foundation</a>.<br/>
    1818This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.</p>
    1919
Note: See TracChangeset for help on using the changeset viewer.