Changeset 3257 for branches/3.2


Ignore:
Timestamp:
Mar 6, 2014, 11:24:24 AM (5 years ago)
Author:
bruno
Message:
  • Remove debug print in Kernel.pm which solves wrong inclusion of kernel modules in boot media
  • Add support for latest Fedora keymap file (/etc/vconsole.conf) and non us keyboard detection
  • Improve initramfs detection for recent kernels (RE updated)
  • Fix udev deps inclusion by mimicing what was done for minimal
Location:
branches/3.2
Files:
2 edited

Legend:

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

    r3254 r3257  
    9494    next if (/^Module/);
    9595    ($module, $void) = split(/ /);
    96     print "***$module***|***$void***\n";
     96    pb_log(2,"***$module***|***$void***\n");
    9797    push @alllivemodules,$module;
    9898}
  • branches/3.2/mindi/mindi

    r3255 r3257  
    388388        LogFile "INFO: Red Hat-style config detected."
    389389        keyfile=/etc/sysconfig/keyboard
     390    elif [ -e "/etc/vconsole.conf" ] ; then
     391        LogFile "INFO: New Fedora style config detected."
     392        keyfile=/etc/vconsole.conf
    390393    elif [ -e "/etc/rc.d/rc.keymap" ] ; then
    391394        LogFile "INFO: Slackware-style config detected."
     
    446449    locale=`grep -F KEYTABLE "$keyfile" | grep -v '^#' | tr -d '"' |cut -d'=' -f2 | sed 's/.map.gz$//'`
    447450    [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'`        # Slackware
    448     [ ! "$locale" ] && locale=`grep -E '^KEYMAP=' "$keyfile" | grep -v '^#' | tr -d '"' |cut -d'=' -f2`     # Gentoo & ArchLinux
     451    [ ! "$locale" ] && locale=`grep -E '^KEYMAP=' "$keyfile" | grep -v '^#' | tr -d '"' |cut -d'=' -f2`     # Gentoo, ArchLinux & New fedora
    449452    [ ! "$locale" ] && locale=`grep -E 'XkbLayout' "$keyfile" | grep -v '^#' | awk '{print $3}' | tr -d '"'`        #  Fedora 19
    450453    LogFile "INFO: locale=$locale"
     
    711714    local lcMagicExt2fs="EXT2-fs: blocksize too small for device."
    712715    local lcMagicExt3fs="<3>EXT3-fs: blocksize too small for journal device."
    713     local lcMagicInitfs="<6>checking if image is initramfs...|[<]6[>]Unpacking initramfs...|<6>Trying to unpack rootfs image as initramfs"
     716    local lcMagicInitfs="<6>checking if image is initramfs...|[<]*6[>]*Unpacking initramfs...|<6>Trying to unpack rootfs image as initramfs"
    714717
    715718    # local variables
     
    26222625                echo "$i" >> $MINDI_TMP/udev.lis
    26232626            done
     2627            finallist=""
     2628            # Remove directories from the list, as tar/cp will create them anyway
     2629            # and it may hurt if /lib is in it as on Debian/Ubuntu
     2630            # recent bash says that -d is true for a link to a dir !
     2631            for f in `sort -u $MINDI_TMP/udev.lis`; do
     2632                if [ -e $f -a ! -d $f ] || [ -h $f ]; then
     2633                    finallist="$finallist $f"
     2634                fi
     2635            done
    26242636            #tar cf - -C / $lis `sort -u $MINDI_TMP/udev.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "ERROR: Problem in udev.lis analysis" $MINDI_TMP/$$.log
    2625             echo "cp -a -n --parents `sort -u $MINDI_TMP/udev.lis` -t $mountpoint/" 2>&1 >> $MINDI_TMP/$$.log
    2626             cp -a -n --parents `sort -u $MINDI_TMP/udev.lis` -t $mountpoint/ 2>> $MINDI_TMP/$$.log  || LogIt "ERROR: Problem in udev.lis analysis" $MINDI_TMP/$$.log
     2637            echo "cp -a -n --parents $finallist -t $mountpoint/" 2>&1 >> $MINDI_TMP/$$.log
     2638            cp -a -n --parents $finallist -t $mountpoint/ 2>> $MINDI_TMP/$$.log  || LogIt "ERROR: Problem in udev.lis analysis" $MINDI_TMP/$$.log
    26272639            rm -f $MINDI_TMP/udev.lis
    26282640        else
     
    26812693    if [ "${kernelname}" != "" ]; then
    26822694        needed_modules_path=lib/modules/${kernelname}
    2683         mkgmopt="-k $needed_modules_path"
     2695        mkgmopt="-k ${kernelname}"
    26842696    else
    26852697        needed_modules_path=lib/modules/$KERVERRUN
     
    26902702    needed_modules=`mr-kernel-get-modules $mkgmopt $list_of_groovy_mods`
    26912703
    2692     LogFile "INFO: Adding $needed_modules to the rootfs"
     2704    LogFile "INFO: Adding $needed_modules to the rootfs with $mkgmopt"
    26932705    cp --parents -aL $needed_modules $mountpoint/ 2>> $MINDI_TMP/$$.log || LogIt "ERROR: Unable to copy modules to $mountpoint" $MINDI_TMP/$$.log
    26942706
Note: See TracChangeset for help on using the changeset viewer.