Changeset 1924 in MondoRescue for branches/stable/mindi


Ignore:
Timestamp:
Apr 18, 2008, 1:41:41 AM (16 years ago)
Author:
Bruno Cornec
Message:

svn merge -r 1902:1923 $SVN_M/branches/2.2.6

Location:
branches/stable/mindi
Files:
4 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/deplist.txt

    r1904 r1924  
    1313
    1414#-------------------------------- ESSENTIAL -----------------------------------
    15 fstab raidtab modules.conf conf.modules mondorestore modules.conf.local
     15fstab raidtab
     16/usr/sbin/mondorestore
    1617/etc/mdadm/mdadm.conf /etc/mdadm.conf
    1718/sbin/ldconfig
     
    2122bzip2 bunzip2 lzop
    2223ctrlaltdel
    23 # Do not remove as they need to be aligned with the kernel
    24 insmod lsmod
     24# Everything needed to handle modules correctly
     25insmod lsmod /sbin/modprobe
     26/etc/modprobe.d /etc/modprobe.conf /etc/modules.conf /etc/conf.modules /etc/modules.conf.local
     27
    2528hosts host.conf resolv.conf hosts.allow hosts.deny
    2629klogd sysklogd
     
    4750# gdb valgrind /usr/lib/valgrind
    4851
    49 #----------------- For all you LVM users out there, much love -----------------
    50 LVMFILES:
    51 lvmiopversion  lvmcreate_initrd  pvdata
    5252#------------------------------------------------------------------------------
    5353#
     
    5656conrep cpqacuxe hponcfg
    5757lshw
     58#----------------- For all you LVM users out there, much love -----------------
     59LVMFILES:
     60lvmiopversion  lvmcreate_initrd  pvdata /etc/lvm/lvm.conf
     61#------------------------------------------------------------------------------
  • branches/stable/mindi/distributions/conf/mindi.conf.dist

    r1842 r1924  
    1010
    1111#
    12 # Maximum number of disks made by mindi
    13 #
    14 mindi_max_disks=99
    15 #
    1612# Extra space for Ram disk
    1713#
    18 mindi_extra_space=32768
     14mindi_extra_space=49152
    1915
    2016#
  • branches/stable/mindi/mindi

    r1904 r1924  
    108108
    109109BOOT_MEDIA_MESSAGE="$mindi_boot_msg"
     110
    110111FDISK=$MINDI_SBIN/parted2fdisk
    111112
     
    171172
    172173    mkdir -p $bigdir/etc
    173     cp --parents -pRdf $mappath $bigdir 2>> $LOGFILE || LogIt "AKMF -- Could not copy $mappath to $bigdir"
     174    #cp --parents -pRdf $mappath $bigdir 2>> $LOGFILE || LogIt "AKMF -- Could not copy $mappath to $bigdir"
     175    tar cf - $mappath 2>> /dev/null | (cd $bigdir ; tar xf -) || LogIt "AKMF -- Could not copy $mappath to $bigdir"
    174176    if [ "`echo $mappath | grep -F ".gz"`" ] ; then
    175177        included_list=`gzip -dc $mappath | grep -Fi include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`
     
    206208    [ "`head $scratchfile -n1 | grep -F "bin/sh"`" != "" ] && StripComments $scratchfile "-$filename-"
    207209    [ "`echo "$filename" | grep -F "etc/termcap"`" != "" ] && StripComments $scratchfile "-$filename-"
    208     if [ "`echo "$filename" | grep -F "lib/modules/" | grep "\.*o\.gz"`" != "" ] ; then
     210
     211    # Uncompress modules only if not using udevd
     212    if [ "`echo "$filename" | grep -F "lib/modules/" | grep "\.*o\.gz"`" != "" ] && [ "`ps auxww | grep -v grep | grep -qw udevd`" != "" ]; then
    209213        mv $scratchfile $scratchfile.gz
    210214        gunzip -f $scratchfile || LogIt "Cannot gunzip $scratchfile.gz"
     
    278282                BIGNO=$(($BIGNO+1))
    279283            else
    280                 cp --parents -Rdf $incoming $outdir 2> /dev/null || Die "Cannot copy $incoming to $outdir - did you run out of disk space?"
    281                 if [ "`echo "$incoming" | grep "lib/modules/.*\..*o\.gz"`" != "" ] ; then
     284                #cp --parents -Rdf $incoming $outdir 2> /dev/null || Die "Cannot copy $incoming to $outdir - did you run out of disk space?"
     285                tar cf - $incoming 2> /dev/null | (cd $outdir ; tar xf -) || Die "Cannot copy $incoming to $outdir - did you run out of disk space?"
     286   
     287                # Only uncompress modules if not using udevd
     288                if [ "`echo "$incoming" | grep "lib/modules/.*\..*o\.gz"`" != "" ] && [ "`ps auxww | grep -v grep | grep -qw udevd`" != "" ]; then
    282289                    gunzip -f $outdir/$incoming || LogIt "Cannot gunzip $outdir/$incoming"
    283290                fi
     
    10221029
    10231030
    1024 MakeModuleLoadingScript() {
    1025     local module fname params modpath kver outerloop i modpaths kver searchpath list_to_echo j
    1026     tmpmodprobe_flag=$1
    1027     outfile=$2
    1028     > $outfile || Die "Cannot create empty $outfile"
    1029     echo -en "#\041/bin/sh\n\n" >> $outfile
    1030     echo "echo -en \"Loading your modules...\"" >> $outfile
    1031     if [ "$YOUR_KERNEL_SUCKS" ] ; then
    1032         kver=$FAILSAFE_KVER
    1033         cd $MINDI_TMP
    1034         searchpath=lib/modules/$kver
    1035     else
    1036 ###
    1037 ### Sq-Modification ... Use kernelname for module search path if specified
    1038 ###
    1039         #kver=`uname -r`
    1040         if [ "${kernelname}" != "" ]
    1041         then
    1042             kver=${kernelname}
    1043         else
    1044             kver=`uname -r`
    1045         fi
    1046 ###
    1047 ### Sq-Modification end
    1048 ###
    1049         searchpath=/lib/modules/$kver
    1050     fi
    1051    
    1052     echo -en "for outerloop in 1 2 3 4 5 ; do\necho -en \".\"\n" >> $outfile
    1053     list_to_echo="$MODULES"
    1054     # Remove unwanted modules from list
    1055     for i in $DENY_MODS; do
    1056         list_to_echo=`echo ${list_to_echo} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '`
    1057         EXTRA_MODS=`echo ${EXTRA_MODS} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '`
    1058     done
    1059 
    1060     # Make temporary modprobe.conf file if we are told so
    1061     if [ "$tmpmodprobe_flag" = "Y" ] ; then
    1062         infile="$MINDI_TMP/modprobe.conf.mindi"
    1063         find /etc/modprobe.d -maxdepth 1 -name "*" -xtype f -print0 | xargs -0 cat > $infile
    1064     else
    1065         infile="/etc/modules.conf"
    1066     fi
    1067 
    1068     for module in $list_to_echo $EXTRA_MODS ; do
    1069         params=`sed -n "s/^options \\+$module \\+//p" $infile`
    1070         modpaths=`FindSpecificModuleInPath $searchpath $module`
    1071         for i in $modpaths ; do
    1072             echo "MyInsmod $i $params > /dev/null 2> /dev/null" \
    1073                 | tr '.' '#' \
    1074                 | sed s/#o#gz/#o/ \
    1075                 | sed s/#o#gz/#o/ \
    1076                 | sed s/#ko#gz/#ko/ \
    1077                 | sed s/#ko#gz/#ko/ \
    1078                 | tr '#' '.' >> $outfile
    1079             echo -en "$i added to module list.\n" >> $LOGFILE
    1080         done
    1081     done
    1082     echo -en "done\n" >> $outfile
    1083     echo "echo \"Done.\"" >> $outfile
    1084     chmod +x $outfile
    1085     cd /
    1086     # Remove temporary modprobe.conf file if we have created one
    1087     if [ "$tmpmodprobe_flag" = "Y" ] ; then
    1088         rm -f $infile
    1089     fi
    1090 }
    1091 
    1092 
    10931031MakeMountlist() {
    10941032    local scratchdir mountlist all_partitions current_partition \
     
    20221960        cd $MINDI_TMP
    20231961        for i in `ListKernelModulePaths | HackPathsToFailsafe` ; do
    2024             cp --parents -pRdf ./$i $bigdir 2>> $LOGFILE || Die "PDDI can't cp $i->$bigdir"
     1962            #cp --parents -pRdf ./$i $bigdir 2>> $LOGFILE || Die "PDDI can't cp $i->$bigdir"
     1963            tar cf - ./$i 2>> $LOGFILE | (cd $bigdir ; tar xf -) || Die "PDDI can't copy $i->$bigdir"
    20251964            if [ "`du -sk $i | cut -f1`" -lt "$(($CHOPSIZE*2))" ] ; then
    2026                 cp --parents -pRdf $i $bigdir 2>> $LOGFILE
     1965                #cp --parents -pRdf $i $bigdir 2>> $LOGFILE
     1966                tar cf - $i 2>> $LOGFILE | (cd $bigdir ; tar xf -)
    20271967            else
    20281968                ChopUpAndCopyFile $i $bigdir $CHOPSIZE $BIGNO
     
    20351975            for k in $j ; do
    20361976                if [ "`du -sk $k | cut -f1`" -lt "$CHOPSIZE" ] ; then
    2037                     cp --parents -pRdf $k $bigdir 2>> $LOGFILE
     1977                    #cp --parents -pRdf $k $bigdir 2>> $LOGFILE
     1978                    tar cf - $k 2>> $LOGFILE | (cd $bigdir ; tar xf -)
    20381979                else
    20391980                    ChopUpAndCopyFile $k $bigdir $CHOPSIZE $BIGNO
     
    20952036        [ "$?" -ne "0" ] && [ _"$MONDO_SHARE" != _"" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts"
    20962037    fi
    2097     [ -d "/lib/dev-state" ] && cp --parents -pRdf /lib/dev-state . 2>> $LOGFILE
     2038    #[ -d "/lib/dev-state" ] && cp --parents -pRdf /lib/dev-state . 2>> $LOGFILE
     2039    [ -d "/lib/dev-state" ] && tar cf - /lib/dev-state 2>> $LOGFILE | tar xf -
    20982040    cd $old_pwd
    20992041    echo -e "$DONE"
     
    24012343    cp -Rdf $tgz_dir_fname/* . 2>&1 >> $LOGFILE
    24022344    tar -zxf symlinks.tgz || Die "Cannot untar symlinks.tgz"
     2345
    24032346    cd dev || Die "Can't cd to dev"
    24042347    tar -zxf dev-entries.tgz || Die "Cannot untar dev-entries.tgz"
     
    24092352        s=`which $w 2> /dev/null`
    24102353        if [ -e "$s" ] ; then
    2411             cp --parents -af $s . 2>> $LOGFILE
    2412         fi
    2413     done
    2414 
    2415     mkdir -p tmp
     2354            #cp --parents -af $s . 2>> $LOGFILE
     2355            tar cf - $s 2> /dev/null | tar xf -
     2356        fi
     2357    done
     2358
    24162359    [ -e "/dev/.devfsd" ] && echo "/dev/.devfsd found" > tmp/USE-DEVFS
    24172360
    24182361    # Handle the case where busybox and mount are dynamically linked
    2419     # Should be done first so that if /lib64 is a link, it's
    2420     # created first like that, instead of as a real dir later on
    24212362    file $MINDI_LIB/rootfs/bin/busybox 2>&1 | grep -q "dynamically"
    24222363    if [ $? -eq 0 ]; then
     2364        # We want to use the real mount
     2365        rm -f bin/mount
    24232366        LocateDeps $MINDI_LIB/rootfs/bin/busybox /bin/mount > $MINDI_TMP/busy.lis
    2424         cp --parents -Rdf `sort -u $MINDI_TMP/busy.lis` .
     2367        #cp --parents -Rdf `sort -u $MINDI_TMP/busy.lis` .
     2368        tar cf - /bin/mount `sort -u $MINDI_TMP/busy.lis` 2> /dev/null | tar xf -
    24252369        rm -f $MINDI_TMP/busy.lis
    24262370    fi
    24272371
     2372    mkdir -p $mountpoint/tmp
    24282373    # Management of udev (which includes modprobe in rules)
    24292374    ps auxww | grep -v grep | grep -qw udevd
    24302375    if [ $? -eq 0 ]; then
    2431         echo "udev device manager found" > tmp/USE-UDEV
     2376        echo "udev device manager found" > $mountpoint/tmp/USE-UDEV
    24322377        LogIt "udev device manager found"
    2433         cp --parents -Rdf /etc/udev . 2> /dev/null
     2378        #cp --parents -Rdf /etc/udev . 2> /dev/null
     2379        tar cf - /etc/udev 2> /dev/null | tar xf -
    24342380        # This avoids NIC remapping if on another machine at restore time on Debian at least
    24352381        rm -f ./etc/udev/rules.d/z25_persistent-net.rules
    2436         cp --parents -Rdf /lib/udev /lib64/udev . 2> /dev/null
     2382        #cp --parents -Rdf /lib/udev /lib64/udev . 2> /dev/null
     2383        tar cf - /lib*/udev 2> /dev/null | tar xf -
    24372384        if [ -x /sbin/udevd ]; then
    24382385            lis2=`grep -Ev '^#' $MINDI_CONF/udev.files`
     
    24602407                fi
    24612408            done
    2462             cp --parents -Rdf $lis `sort -u $MINDI_TMP/udev.lis` .
     2409            #cp --parents -Rdf $lis `sort -u $MINDI_TMP/udev.lis` .
     2410            tar cf - $lis `sort -u $MINDI_TMP/udev.lis` 2> /dev/null | tar xf -
    24632411            rm -f $MINDI_TMP/udev.lis
    24642412        else
    24652413            echo "udevd daemon not in standard place (/sbin)" 2>&1 | tee -a $LOGFILE
    24662414            echo "mindi will use static devices which may cause problems" 2>&1 | tee -a $LOGFILE
    2467             rm -f tmp/USE-UDEV
     2415            rm -f $mountpoint/tmp/USE-UDEV
    24682416        fi
    24692417    fi
     
    24782426            lis=`grep -Ev '^#' $MINDI_CACHE/tools.files`
    24792427            LocateDeps $lis > $MINDI_TMP/tools.lis
    2480             cp --parents -Rdf $lis `sort -u $MINDI_TMP/tools.lis` .
     2428            #cp --parents -Rdf $lis `sort -u $MINDI_TMP/tools.lis` .
     2429            tar cf - $lis `sort -u $MINDI_TMP/tools.lis` 2> /dev/null | tar xf -
    24812430        fi
    24822431        if [ -f $MINDI_CACHE/mindi-rsthw ]; then
     
    24972446    fi
    24982447
    2499     cp --parents -Rdf /dev/fd0*[1,2][4,7,8]* . 2> /dev/null
     2448    #cp --parents -Rdf /dev/fd0*[1,2][4,7,8]* . 2> /dev/null
     2449    tar cf - /dev/fd0*[1,2][4,7,8]* 2> /dev/null | tar xf -
    25002450
    25012451    cd $old_pwd
    2502     echo -en "..."
    2503     MakeModuleLoadingScript $TMPMODPROBE_FLAG $mountpoint/sbin/insert-all-my-modules
    25042452    echo -en "..."
    25052453    old_pwd=`pwd`
     
    25362484        needed_modules="$needed_modules `FindSpecificModuleInPath $needed_modules_path $i`"
    25372485    done
     2486
    25382487    for i in $needed_modules ; do
    25392488        [ -e "$i" ] && s=`du -sk $i | cut -f1` || s=""
    25402489        [ "$YOUR_KERNEL_SUCKS" ] && i=$MINDI_TMP/$i
    25412490        echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE
    2542         cp --parents -pdf $i $mountpoint 2>/dev/null || LogIt "Unable to copy $i to $mountpoint"
    2543         # Uncompress modules if not useing udev and native modprobe
     2491        #cp --parents -Rpdf $i $mountpoint 2>/dev/null || LogIt "Unable to copy $i to $mountpoint"
     2492        tar cf - $i 2>/dev/null | (cd $mountpoint ; tar xf -) || LogIt "Unable to copy $i to $mountpoint"
     2493        # Uncompress modules if not using udev and native modprobe
    25442494        if [ ! -f $mountpoint/tmp/USE-UDEV ]; then
    25452495            if [ "`echo "$i" | grep -F ".gz"`" ]; then
     2496                echo "Uncompressing $i" >> $LOGFILE
    25462497                gunzip -f $mountpoint/$i
    2547                 #i=`echo $i | sed 's/.gz//'`
    25482498            fi
    25492499        fi
     
    25512501
    25522502    # Also copy modules.dep in case of udev so that normal modprobe works
    2553     cp --parents -pdf /$needed_modules_path/modules.dep $mountpoint 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
    2554 
    2555     # For all modules supported, create symlinks under the mountpoint
    2556     for i in $EXTRA_MODS $NET_MODS $SCSI_MODS; do
    2557         all_modules="$all_modules `FindSpecificModuleInPath $mountpoint $i | sed 's~^$mountpoint/~~g'`"
    2558     done
    2559     for i in $all_modules; do
    2560         (cd $mountpoint ; ln -s $i . 2>/dev/null)
    2561     done
     2503    #cp --parents -Rpdf /$needed_modules_path/modules.dep $mountpoint 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
     2504    tar cf - /$needed_modules_path/modules.dep 2>/dev/null | (cd $mountpoint ; tar xf -) || LogIt "Unable to copy modules.dep to $mountpoint"
     2505
    25622506    if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then
    25632507        echo "Deleting devfsd daemon from ramdisk" >> $LOGFILE
     
    25702514    dd if=/dev/zero of=$mountpoint/zero &> /dev/null
    25712515    rm -f $mountpoint/zero
    2572     mkdir -p $mountpoint/tmp
    25732516    if [ _"$MONDO_SHARE" != _"" ]; then
    25742517        cp -f $MONDO_CACHE/mondo-restore.cfg $mountpoint/tmp &> /dev/null || Die "Cannot copy mondo-restore.cfg to ramdisk"
     
    26662609echo "-----------------------------" >> $LOGFILE
    26672610
    2668 if [ -e "/etc/conf.modules" ] && [ ! -e "/etc/modules.conf" ] ; then
    2669     LogIt "WARNING - Ancient distro detected." 1
    2670     ln -sf /etc/conf.modules /etc/modules.conf
    2671 fi
    26722611[ -e "/sbin/mkdosfs" ] && [ ! -e "/sbin/mkfs.vfat" ] && ln -sf /sbin/mkdosfs /sbin/mkfs.vfat
    26732612
     
    27042643
    27052644[ "`uname -r | grep "2.4.[0-6]" | grep -v "2.4.[0-9][0-9]"`" != "" ] &&  echo "WARNING! Your kernel may have buggy loopfs code. Consider upgrading to 2.4.7"
    2706 # If we have a 2.6 kernel, the system uses module-init-tools which means that we
    2707 # may have the modprobe configuration spread out across multiple files in
    2708 # directory /etc/modprobe.d. If this is the case we concatenate these files into
    2709 # a temporary file for further processing. Otherwise we continue in the standard
    2710 # way. Note further that in case /etc/modprobe.d exists, we use it and ignore
    2711 # /etc/modprobe.conf which is exactly what module-init-tools does. The temporary
    2712 # modprobe.conf file is created in MakeModuleLoadingScript. AL041128.
    2713 if [ -d "/etc/modprobe.d" ] && [ "`uname -r | cut -c1-3`" = "2.6" ] ; then
    2714     TMPMODPROBE_FLAG="Y"
    2715 else
    2716     TMPMODPROBE_FLAG="N"
    2717     [ -e "/etc/modprobe.conf" ] && [ ! -e "/etc/modules.conf" ] && ln -sf /etc/modprobe.conf /etc/modules.conf
    2718     [ ! -e "/etc/modules.conf" ] && Die "/etc/modules.conf not found; you may have to create a softlink from /etc/conf.modules to /etc/modules.conf; of course, all good distros use modules.conf anyway..."
    2719 fi
    27202645
    27212646# Update the PATH variable if incomplete
     
    30372962    mkdir -p $MINDI_TMP/small-all/tmp
    30382963    MakeMountlist $MINDI_TMP/small-all/tmp/mountlist.txt
    3039     cp -f $MINDI_TMP/{filelist.full.gz,biggielist.txt} $MONDO_CACHE/mondo-restore.cfg $MINDI_CACHE/small-all/tmp 2>/dev/null || Die "Cannot copy small all.tar.gz"
     2964    cp -f $MINDI_TMP/{mountlist.txt,filelist.full.gz,biggielist.txt} $MONDO_CACHE/mondo-restore.cfg $MINDI_CACHE/small-all/tmp 2>/dev/null || Die "Cannot copy small all.tar.gz"
    30402965    cd $MINDI_TMP/small-all
    3041     tar -cv tmp | gzip -9 > $MINDI_CACHE/all.tar.gz || Die "Cannot make small all.tar.gz"
     2966    tar -cv ./tmp | gzip -9 > $MINDI_TMP/all.tar.gz || Die "Cannot make small all.tar.gz"
    30422967    sync
     2968    sleep 2
    30432969    LogIt "Done. Exiting."
    30442970    MindiExit 0
  • branches/stable/mindi/mindi-bkphw

    r1903 r1924  
    1111# Handling Configuration files
    1212die "No CACHE_DIR parameter" if ((not defined $ARGV[0]) || (! -d $ARGV[0]));
    13 my $bkpdir = "$ARGV[0]/bkphw";
     13my $locbkpdir = "/bkphw";
     14my $bkpdir = "$ARGV[0]$locbkpdir";
    1415die "No CONF_DIR parameter" if ((not defined $ARGV[1]) || (! -d $ARGV[1]));
    1516my $confdir = "$ARGV[1]";
     
    5960        if ($tool =~ /\/conrep$/) {
    6061            $ret = system("cd $tooldir ; $tool -s -f$bkpdir/conrep.dat");
    61             print SCRIPT "(cd $tooldir ; $tool -l -f$bkpdir/conrep.dat)\n";
     62            print SCRIPT "(cd $tooldir ; $tool -l -f$locbkpdir/conrep.dat)\n";
    6263            print TOOLS "$tool.xml\n";
    6364        }
     
    6566            my $dir=basename($tool);
    6667            $ret = system("export ACUXE_BIN_INSTALLATION_DIR=$dir ; export IM_CFGFILE_PATH=$dir ; export ACUXE_LOCK_FILES_DIR=$dir/locks ; $tool -c $bkpdir/cpqacuxe.dat");
    67             print SCRIPT "export ACUXE_BIN_INSTALLATION_DIR=$dir ; export IM_CFGFILE_PATH=$dir ; export ACUXE_LOCK_FILES_DIR=$dir/locks ; $tool -i $bkpdir/cpqacuxe.dat\n";
     68            print SCRIPT "export ACUXE_BIN_INSTALLATION_DIR=$dir ; export IM_CFGFILE_PATH=$dir ; export ACUXE_LOCK_FILES_DIR=$dir/locks ; $tool -i $locbkpdir/cpqacuxe.dat\n";
    6869            print TOOLS "$tooldir/bld\n";
    6970        }
    7071        if ($tool =~ /\/hponcfg$/) {
    7172            $ret = system("$tool -w $bkpdir/hponcfg.dat");
    72             print SCRIPT "$tool -r $bkpdir/hponcfg.dat\n";
     73            print SCRIPT "$tool -r $locbkpdir/hponcfg.dat\n";
    7374        }
    7475        if ($tool =~ /\.scexe$/) {
    7576            print "Found $tool, that firmware will be applied at restore time on your HP Proliant\n";
    76             print SCRIPT "$tool\n";
     77            print SCRIPT "./$tool\n";
    7778        }
    7879        if ($ret != 0) {
  • branches/stable/mindi/rootfs/sbin/init

    r1903 r1924  
    7979    openvt 7 /bin/sh /sbin/wait-for-petris
    8080    openvt 8 /usr/bin/tail -f $LOGFILE
     81    # May avoid shell error messages
     82    chmod 666 /dev/tty* /dev/console
    8183}
    8284
     
    162164    fi
    163165    echo "Activating a potential USB Storage device"
    164     if [ -f usb-storage.ko ] || [ -f usb-storage.ko.gz ]; then
    165         if [ -e "/tmp/USE-UDEV" ] ; then
    166             modprobe -q usb-storage
    167         else
    168             insmod usb-storage.ko*
    169         fi
    170     fi
     166    modprobe -q usb-storage
    171167    for i in 1 2 3 4 5 6 7 8 9 10 ; do
    172168        sleep 1
     
    199195HowMuchFreeSpaceOnRamdisk() {
    200196   df -m -P | grep /dev/ram | head -n1 | tr -s '\t' ' ' | cut -d' ' -f4
    201 }
    202 
    203 
    204 
    205 InsertEssentialModules() {
    206 #   Load the VIA IDE module first thing if it exists (requires ide-core).
    207 #   This is to ensure that DMA is working for VIA chipsets with 2.6 kernels.
    208     for module in /ide-core.ko* /via82cxxx.ko*; do
    209         [ -f "$module" ] && MyInsmod $module > /dev/null 2> /dev/null
    210     done
    211 #   Then load the remaining modules in normal (i.e. arbitrary) order.
    212     for j in 1 2 3 4 5 ; do
    213         for i in `ls /*.*o* 2> /dev/null` ; do
    214             [ -f "$i" ] && MyInsmod $i > /dev/null 2> /dev/null
    215         done
    216     done
    217197}
    218198
     
    314294    fi
    315295    create_dev_makedev
    316     # May avoid shell error messages
    317     chmod 644 /dev/tty*
    318296    if [ -x /sbin/udevsettle ]; then
    319297        /sbin/udevsettle
     
    353331            answer="YES"
    354332        fi
    355         if [ "$answer" -eq "YES" ] ; then
     333        if [ "$answer" = "YES" ] ; then
    356334            ./mindi-rsthw
    357335        fi
     
    389367    return
    390368fi
    391 if [ -e "/tmp/USE-UDEV" ] ; then
    392     if [ -f uhcd_hci.ko ] || [ -f uhcd_hci.ko.gz ]; then
    393         modprobe -q uhcd_hci
    394     fi
    395     if [ -f usbhid.ko ] || [ -f usbhid.ko.gz ]; then
    396         modprobe -q usbhid
    397     fi
    398 else
    399     if [ -f uhcd_hci.ko ]; then
    400         insmod uhcd_hci.ko
    401     fi
    402     if [ -f usbhid.ko ]; then
    403         insmod usbcore.ko
    404         insmod usbhid.ko
    405     fi
    406 fi
     369modprobe -q uhcd_hci
     370modprobe -q usbhid
    407371}
    408372
     
    413377        LogIt "Scanning LVM's..." 1
    414378        if which lvm ; then
    415             MyInsmod dm-mod
    416             MyInsmod dm_mod
     379            modprobe -q dm-mod
     380            modprobe -q dm_mod
    417381            lvm vgscan --mknodes
    418382        else
     
    566530ModprobeAllModules() {
    567531
    568     for m in `find /lib/modules -name '*.ko*'`; do
     532    for m in `find /lib/modules -name '*\.ko*' -o -name '*\.o*'`; do
    569533        j=`basename $m | sed 's/\.ko.*$//'`
     534        j=`basename $m | sed 's/\.o.*$//'`
    570535        echo "$DENY_MODS" | grep -q "$j "
    571536        if [ $? -eq 0 ]; then
     
    584549    PKLVL=`cut -f1 /proc/sys/kernel/printk`
    585550    echo 0 > /proc/sys/kernel/printk
    586     if [ ! -e "/tmp/USE-UDEV" ] ; then
    587         echo "Inserting modules ..."
    588         insert-all-my-modules >> $LOGFILE 2>> $LOGFILE
    589         for i in $FORCE_MODS; do
    590             MyInsmod $i
    591         done
    592     else
    593         ModprobeAllModules
    594     fi
     551    ModprobeAllModules
    595552    echo $PKLVL > /proc/sys/kernel/printk
    596553}
     
    654611PKLVL=`cut -f1 /proc/sys/kernel/printk`
    655612echo 0 > /proc/sys/kernel/printk
    656 if [ ! -e "/tmp/USE-UDEV" ] ; then
    657     InsertEssentialModules
    658 else
    659     ModprobeAllModules
    660 fi
     613ModprobeAllModules
    661614echo $PKLVL > /proc/sys/kernel/printk
    662615
Note: See TracChangeset for help on using the changeset viewer.