Changeset 1408 for branches/stable


Ignore:
Timestamp:
May 7, 2007, 2:07:32 PM (12 years ago)
Author:
bruno
Message:
  • Fix a Debian packaging bug
  • Do not use mindi-boot.2880.img (which may not exist) anymore in mondorestore
  • Adds a debuging message for image_devs for mondo
  • Adds some useful log info for debugging at restore time in init
  • Debian stores its optimised libraries in /lib/i686/cmov now. (Andree Leidenfrost)
  • Fix a bug on lsmod | sed. (Andree Leidenfrost). As a consequence, lsmod is not used anymo

re in mindi (except for log). Replaced by /proc/modules. And the MODULES variable is now us
ed to avoid code duplication.

Location:
branches/stable
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/distributions/debian/rules

    r996 r1408  
    2626    dh_installdirs
    2727    # Build the installation tree:
    28     ( export RPMBUILDMINDI=true && export HEAD=$(CURDIR)/debian/$(PACKAGE_NAME) && export PREFIX=/usr && export CONFDIR=/etc && export MANDIR=$(PREFIX)/share/man && export LIBDIR=$(PREFIX)/lib && export DOCDIR=$(PREFIX)/share/doc && ./install.sh )
     28    export PREFIX=/usr
     29    ( export RPMBUILDMINDI=true && export HEAD=$(CURDIR)/debian/$(PACKAGE_NAME) && export CONFDIR=/etc && export MANDIR=$(PREFIX)/share/man && export LIBDIR=$(PREFIX)/lib && export DOCDIR=$(PREFIX)/share/doc && ./install.sh )
    2930
    3031# Build architecture-independent files here.
  • branches/stable/mindi/mindi

    r1350 r1408  
    473473        echo -en "."
    474474        reason=""
    475         vanilla_lib_name=`echo "$optimized_lib_name" | sed s/i[5-7]86// | tr -s '/' '/'`
     475        vanilla_lib_name=`echo "$optimized_lib_name" | sed -e 's/i[5-7]86//' -e 's/cmov//' | tr -s '/' '/'`
    476476        echo "$vanilla_lib_name" >> $filelist
    477477        resolved=$vanilla_lib_name
     
    940940    local module_list module fname oss r kern
    941941    oss="/root/oss/modules"
    942     module_list="`lsmod | sed -n '2,$s/ .*//'`"
     942    module_list="$MODULES"
    943943    # Remove unwanted modules from list
    944944    for i in $DENY_MODS; do
     
    977977            if echo $fname | grep lvm &> /dev/null ; then
    978978                echo "This warning only affects you if you are using LVM." >> $LOGFILE
    979                 if lsmod | grep lvm &> /dev/null ; then
     979                if echo "$MODULES" | grep lvm &> /dev/null ; then
    980980                    echo "I think you are, so please take heed!" >> $LOGFILE
    981981                else
     
    10841084    echo -en "for outerloop in 1 2 3 4 5 ; do\necho -en \".\"\n" >> $outfile
    10851085    # BERLIOS: That code is duplicated - Should be done once only
    1086     list_to_echo="`lsmod | sed -n '2,$s/ .*//'`"
     1086    list_to_echo="$MODULES"
    10871087    # Remove unwanted modules from list
    10881088    for i in $DENY_MODS; do
     
    26962696    fi
    26972697
    2698     lsmod > tmp/original-lsmod.txt
    2699    
    27002698    cp --parents -Rdf /dev/fd0*[1,2][4,7,8]* . 2> /dev/null
    27012699    cd $old_pwd
     
    28142812WhichOfTheseModulesAreLoaded() {
    28152813    local modname loaded_modules
    2816     loaded_modules=" `lsmod | tr -s ' ' '\t' | cut -f1 | grep -Fvx "Modules" | tr '\n' ' '` "
     2814    loaded_modules="$MODULES"
    28172815    for modname in $1 ; do
    28182816        [ "`echo "$loaded_modules" | grep -F " $modname "`" ] && echo "$modname"
     
    28692867    Die "MINDI_CACHE undefined"
    28702868fi
    2871 rm -rf $MINDI_CACHE 2> /dev/null
     2869rm -rf $MINDI_CACHE/* 2> /dev/null
    28722870mkdir -p $MINDI_CACHE
    28732871
     
    30373035echo "-------------" >> $LOGFILE
    30383036lsmod >> $LOGFILE
     3037MODULES="`cat /proc/modules | awk '{print $1}'`"
    30393038echo "-------------" >> $LOGFILE
    30403039echo "Liste of extra modules is:" >> $LOGFILE
     
    32883287[ "$YOUR_KERNEL_SUCKS" ] && [ ! "$FAILSAFE_KVER" ] && Die "Please install mindi-kernel package. You need it.\nGo to http://www.mondorescue.org and download it, then install it."
    32893288
    3290 rm -f $MINDI_CACHE/{*img,*gz,*iso}
    3291 
    32923289PrepareDataDiskImages $MINDI_CACHE
    32933290noof_disks=$?
  • branches/stable/mindi/rootfs/sbin/init

    r1351 r1408  
    523523openvt 8 /usr/bin/tail -f $LOGFILE
    524524
     525# Log some useful info
     526echo "init (from mindi v$MINDI_VER-r${MINDI_REV}" >> $LOGFILE
     527echo "/proc/cmdline is:" >> $LOGFILE
     528cat /proc/cmdline  >> $LOGFILE
     529echo "Start date : `date`" >> $LOGFILE
     530echo "df result:" >> $LOGFILE
     531echo "----------" >> $LOGFILE
     532df >> $LOGFILE
     533echo "-------------" >> $LOGFILE
     534echo "mount result:" >> $LOGFILE
     535echo "-------------" >> $LOGFILE
     536mount >> $LOGFILE
     537echo "-------------" >> $LOGFILE
     538echo "lsmod result:" >> $LOGFILE
     539echo "-------------" >> $LOGFILE
     540lsmod >> $LOGFILE
     541echo "-------------" >> $LOGFILE
     542
    525543#-------------------------------
    526544#ABSORBENTANDYELLOWANDPOROUSISHE#;# --- don't touch this either :)
    527545#-------------------------------
    528 
    529 lsmod > /tmp/ramdisk-lsmod.txt 2> /dev/null
    530 cut -d' ' -f1 /tmp/original-lsmod.txt /tmp/original-lsmod.txt /tmp/ramdisk-lsmod.txt | sort | uniq -d > /tmp/missing-modules.txt
    531 echo "Warning - these modules did not make it onto the ramdisk" >> $LOGFILE
    532 cat /tmp/missing-modules.txt >> $LOGFILE
    533546
    534547#ctrlaltdel soft
  • branches/stable/mondo/src/common/libmondo-archive.c

    r1365 r1408  
    27632763        if (!does_file_exist("/var/cache/mindi/mindi-kern.1722.img"))
    27642764#else
     2765        /* BERLIOS: To be improved */
    27652766        if (!does_file_exist("/var/cache/mindi/mindi-bootroot.1722.img")
    27662767            && !does_file_exist("/var/cache/mindi/mindi-boot.1440.img")
    27672768            && !does_file_exist("/var/cache/mindi/mindi-boot.2880.img")
    2768             && !does_file_exist("/var/cache/mindi/mindi-boot.5760.img"))
     2769            && !does_file_exist("/var/cache/mindi/mindi-boot.5760.img")
     2770            && !does_file_exist("/var/cache/mindi/mindi-boot.8192.img"))
    27692771#endif
    27702772        {
  • branches/stable/mondo/src/common/libmondo-devices.c

    r1365 r1408  
    19791979    log_it("scratchdir = '%s'", bkpinfo->scratchdir);
    19801980    log_it("tmpdir = '%s'", bkpinfo->tmpdir);
     1981    log_it("image_devs = '%s'", bkpinfo->image_devs);
    19811982    log_it("boot_device = '%s' (loader=%c)", bkpinfo->boot_device,
    19821983           bkpinfo->boot_loader);
  • branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c

    r1384 r1408  
    22232223            }
    22242224        } else {
    2225             mr_msg(2,
     2225            /* BERLIOS : Useless ? */
     2226            /* That boot image doesn't always exist where the following method always works
     2227            log_msg(2,
    22262228                    "gcffa --- looking at mounted CD for mindi-boot.2880.img");
    2227             /* BERLIOS : Useless ?
    22282229            mr_asprintf(&command,
    22292230                    "mount " MNT_CDROM
     
    22322233            mr_asprintf(&mounted_cfgf_path, "%s/%s", mountpt, cfg_file);
    22332234            if (!does_file_exist(mounted_cfgf_path)) {
    2234                 mr_msg(2,
    2235                         "gcffa --- Plan C, a.k.a. untarring some file from all.tar.gz");
     2235                log_msg(2,
     2236                        "gcffa --- Plan B, a.k.a. untarring some file from all.tar.gz");
    22362237                mr_asprintf(&command, "tar -zxvf " MNT_CDROM "/images/all.tar.gz %s %s %s %s %s", MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB, BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, "tmp/i-want-my-lvm"); // add -b TAPE_BLOCK_SIZE if you _really_ think it's necessary
    22372238                run_program_and_log_output(command, TRUE);
Note: See TracChangeset for help on using the changeset viewer.