Changeset 3911 in MondoRescue


Ignore:
Timestamp:
May 8, 2025, 6:38:09 PM (6 weeks ago)
Author:
Bruno Cornec
Message:

Debian 11 fixes patch from Christoph.Griesbeck_at_de.fkdelvotec.com adapted where necessary

Location:
branches/3.3
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/MondoRescue/lib/MondoRescue/Kernel.pm

    r3908 r3911  
    6666=item B<mr_kernel_get_modules>
    6767
    68 Tis function takes as input the kernel version to examined (can be undef in which case the running kernel is used) and a list of modules names to examined as well (can be undef in which case all modules ar taken)
     68Tis function takes as input the kernel version to examined (can be undef in which case the running kernel is used) and a list of modules names to examined as well (can be undef in which case all modules are taken)
    6969This function returns back the modules path as a first argument and the list of relative modules path for the modules names passed.
    7070
     
    137137    pb_log(1,"Analyzing $m\n");
    138138    if (not defined $modpath{$m}) {
    139         # Useful for Debian 11+ distros
     139        # Useful for Debian 11+ distros ??? TODO: check
    140140        my $mm;
    141141        $mm = $m;
  • branches/3.3/mindi-busybox/util-linux/rdate.c

    r3910 r3911  
    7171            struct timespec ts;
    7272            ts.tv_sec = remote_time;
    73             ts.tv_nsec = 0;
     73        s   ts.tv_nsec = 0;
    7474            if (clock_settime(CLOCK_REALTIME, &ts) < 0)
    7575                bb_perror_msg_and_die("can't set time of day");
    7676        }
    77     }
    7877
    7978    if (flags != 1) /* not lone -s */
  • branches/3.3/mindi/mindi

    r3909 r3911  
    854854
    855855ListKernelModulePaths() {
    856     local module_list module fname r kern
     856    # To be replaced by mr_kernel_get_modules
     857    local module_list module module2 fname r r2 kern
    857858    module_list="$MODULES"
    858859    # Remove unwanted modules from list
     
    877878        r=`find /lib/modules/$kern -type f | grep "/${module}\..*o" | tail -n1`
    878879        if [ -z "$r" ]; then
    879             if [ "`echo "$MODULES" | grep -w $module`" ]; then
    880                 r="[live module file not found]"
     880            module2=`echo ${module} | tr '_' '-'`
     881            module2=`echo ${module2} | sed -e 's/x86-64/x86_64/g'`
     882            r2=`find /lib/modules/$kern -type f | grep "/${module2}\..*o" | tail -n1`
     883            if [ -n "$r2" ]; then
     884                [ -f "$r2" ] && echo "$r2"
     885                r="$r2"
    881886            else
    882                 r="[extra module file not found]"
     887                if [ "`echo "$MODULES" | grep -w $module`" ]; then
     888                    r="[live module file not found]"
     889                else
     890                    r="[extra module file not found]"
     891                fi
    883892            fi
    884893        else
  • branches/3.3/mondo/src/common/libmondo-archive.c

    r3893 r3911  
    27312731        if (strcmp(bootldr_ver,"") == 0) {
    27322732            mr_free(bootldr_ver);
    2733             bootldr_ver = call_program_and_get_last_line_of_output("grub2-install --version");
     2733            bootldr_ver = call_program_and_get_last_line_of_output("grub-install --version");
     2734            if (strcmp(bootldr_ver,"") == 0) {
     2735                mr_free(bootldr_ver);
     2736                bootldr_ver = call_program_and_get_last_line_of_output("grub2-install --version");
     2737            }
    27342738        }
    27352739    } else if (bkpinfo->boot_loader == 'R') {
  • branches/3.3/mondo/src/mondorestore/mondorestore.c

    r3900 r3911  
    798798            } else {
    799799                if (filelist_subset_fname != NULL) {
    800                     mr_asprintf(command, "afio -i -M 8m -b %ld -c %ld %s -w '%s' %s", TAPE_BLOCK_SIZE, BUFSIZE, executable, filelist_subset_fname, tarball_fname);
     800                    mr_asprintf(command, "afio -i -8 allowinsecuresymlinks -M 8m -b %ld -c %ld %s -w '%s' %s", TAPE_BLOCK_SIZE, BUFSIZE, executable, filelist_subset_fname, tarball_fname);
    801801                } else {
    802                     mr_asprintf(command, "afio -i -b %ld -c %ld -M 8m %s %s", TAPE_BLOCK_SIZE, BUFSIZE, executable, tarball_fname);
     802                    mr_asprintf(command, "afio -i -8 allowinsecuresymlinks -b %ld -c %ld -M 8m %s %s", TAPE_BLOCK_SIZE, BUFSIZE, executable, tarball_fname);
    803803                }
    804804            }
  • branches/3.3/mondo/src/restore-scripts/mondo/mr-label-partitions-as-necessary

    r3732 r3911  
    4141                command="tune2fs $opttun $label $mountpt"
    4242            fi
     43            LogIt "Running e2fsck -f -p $mountpt"
     44            e2fsck -f -p $mountpt
    4345            LogIt "Running $command"
    4446            $command
  • branches/3.3/mondo/src/restore-scripts/mondo/mr-make-me-bootable

    r3745 r3911  
    2626    drive=`echo $i | sed -e 's/[0-9]*$//' -e 's/\([0-9]\)p$/\1/'`
    2727    if [ "$drivetouse" = "$drive" ]; then
    28         # We can continue as this is the drive we ned to work on
     28        # We can continue as this is the drive we need to work on
    2929        partno=`echo $i | sed -e 's/^.*[^0-9]\([0-9]*\)$/\1/'`
    3030        mountpt=`grep "$i " $1 | tr -s '\t' ' ' | cut -d' ' -f2`
     
    4949    driveline=`grep -E '[   ]/boot[     ]' $1`
    5050    [ ! "$driveline" ] && driveline=`grep -E '[     ]/[     ]' $1`
     51    drive=`echo "$driveline" | cut -d' ' -f1 | grep -o '.*[^0-9]'`
    5152    partno=`echo "$driveline" | cut -d' ' -f1 | awk -F "[a-z]" '{print $NF;}'`
    52 #    echo "driveline=$driveline --> partno=$partno"
     53#    echo "driveline=$driveline --> partno=$partno and drive=$drive"
    5354fi
    5455
    55 if [ "$drive" ] ; then
     56if [ "$drive" ] && [ "$drivetouse" = "$drive" ]; then
    5657    if [ "$partno" = "0" ] || [ ! "$partno" ] ; then
    5758        partno="1"
     
    5960    cmd=""
    6061    for p in $activepart; do
    61         # First desactivate active partitions (coming from previous usage)
     62        # First deactivate active partitions (coming from previous usage)
    6263        cmd="${cmd}a\n$p\n"
    6364        if [ "$dummy" != "" ] ; then
    64             echo "Will desactivate $p on $drive" >> $LOGFILE
     65            echo "Will deactivate $p on $drive" >> $LOGFILE
    6566        fi
    6667    done
Note: See TracChangeset for help on using the changeset viewer.