Changeset 1062 in MondoRescue


Ignore:
Timestamp:
Jan 18, 2007, 2:57:08 PM (17 years ago)
Author:
andree
Message:

Add script for finding distribution specific FAILSAFE kernel and add
hooks for calling it to mindi.
(Merge Debian enhancement into mainstream.)

Location:
branches/stable/mindi
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/mindi

    r1060 r1062  
    27222722fi
    27232723
    2724 [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1`
     2724# If we have a distribution-specific script for finding a FAILSAFE kernel, use it.
     2725if [ -f "$MINDI_LIB/FindDistroFailsafe" ] && [ ! "$1" = "--makemountlist" ] && [ "$kernelpath" = "FAILSAFE" ]; then
     2726    source $MINDI_LIB/FindDistroFailsafe
     2727    # Log kernel image
     2728    LogIt "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)"
     2729else
     2730    [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1`
     2731fi
    27252732
    27262733if ! which mkfs.vfat &> /dev/null ; then
     
    29612968fi
    29622969if [ "$YOUR_KERNEL_SUCKS" != "" ] || [ "$kernelpath" = "" ] || [ "$kernelpath" = "SUCKS" ] || [ "$kernelpath" = "FAILSAFE" ] ; then
    2963     kernelpath=$MINDI_LIB/vmlinuz
    2964     LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks."
    2965     LogIt "However, you are still running your kernel. If Mindi fails to create your"
    2966     LogIt "disks then it may still be a result of a problem with your kernel."
    2967     pwd=`pwd`
    2968     cd $MINDI_TMP
    2969     bzip2 -dc $MINDI_LIB/lib.tar.bz2 | tar -x || Die "Cannot unzip lib.tar.bz2"
    2970     cd $pwd
     2970    # If we have a distribution-specific script for finding a FAILSAFE kernel, use it.
     2971    if [ -f "$MINDI_LIB/FindDistroFailsafe" ] && [ ! "$1" = "--makemountlist" ]; then
     2972        source $MINDI_LIB/FindDistroFailsafe
     2973        # Log kernel image
     2974        LogIt "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)"
     2975        kernelpath="$FAILSAFE_KBIN"
     2976        LogIt "I shall include a failsafe kernel, not your kernel, in the boot disks.\n"
     2977        LogIt "The failsafe kernel is $kernelpath.\n"
     2978        LogIt "However, you are still running your kernel. If Mindi fails to create your\n"
     2979        LogIt "disks then it may still be a result of a problem with your kernel.\n"
     2980        pwd=`pwd`
     2981        cd $TMP_ROOT
     2982        mkdir -p lib/modules
     2983        cp -a "/lib/modules/$FAILSAFE_KVER" "lib/modules/$FAILSAFE_KVER" || Die "Cannot copy kernel modules."
     2984        cd $pwd
     2985    else
     2986        kernelpath=$MINDI_LIB/vmlinuz
     2987        LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks."
     2988        LogIt "However, you are still running your kernel. If Mindi fails to create your"
     2989        LogIt "disks then it may still be a result of a problem with your kernel."
     2990        pwd=`pwd`
     2991        cd $MINDI_TMP
     2992        bzip2 -dc $MINDI_LIB/lib.tar.bz2 | tar -x || Die "Cannot unzip lib.tar.bz2"
     2993        cd $pwd
     2994    fi
    29712995    YOUR_KERNEL_SUCKS="Your kernel sucks"
    29722996fi
Note: See TracChangeset for help on using the changeset viewer.