Changeset 3525


Ignore:
Timestamp:
Mar 4, 2016, 12:14:33 AM (19 months ago)
Author:
bruno
Message:

Fix issues detected at restore time for mindi standalone

  • size_of_all_tool should be computed in PrepareDataDiskImages? to be used by further functions
  • Fix a bad ref where $mountpoint was again missing
  • Also backups directory correctly for udev dependencies
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3524 r3525  
    22092209    fi
    22102210
     2211    # Here we need to know the ramdisk_size
     2212    size_of_all_tools=`du -sk $bigdir | cut -f1`
     2213    export ramdisk_size=$(($size_of_all_tools+$EXTRA_SPACE))
     2214    LogFile "INFO: Ramdisk will be $ramdisk_size KB"
     2215
    22112216    MakeBootConfFile $boottype > $bootconf
    22122217
    22132218    echo -en "INFO: Tarring and zipping the data content..."
    2214     size_of_all_tools=`du -sk $bigdir | cut -f1`
    22152219    (cd "$bigdir" ; tar -b 4096 -cf - . 2>> $MINDI_TMP/$$.log | gzip -9 > $MINDI_CACHE/all.tar.gz || LogAll "ERROR: Problem creating all.tar.gz" $MINDI_TMP/$$.log)
    22162220    LogFile "Size of the data content"
     
    25962600
    25972601    # For older distributions expecting /sbin/init provides it
    2598     if [ ! -e "sbin/init" ]; then
     2602    if [ ! -e "$mountpoint/sbin/init" ]; then
    25992603        (cd $mountpoint/sbin ; ln -sf ../usr/sbin/init .)
    26002604    fi
     
    26412645                    done
    26422646                    lis="$lis $j"
     2647                elif [ -d $i ]; then
     2648                    lis3="$lis3 $i"
    26432649                elif [ -f $i ]; then
    26442650                    lis="$lis $i"
     
    26662672                fi
    26672673            done
     2674            # But adds the directory useful for udev in $lis3
    26682675            fnllist=`echo $finallist | tr ' ' '\n' | sort -u | tr '\n' ' '`
    26692676            LogFile "INFO: Copying udev related files with cp -a --parents $fnllist -t $mountpoint/"
    2670             cp -a --parents $fnllist -t $mountpoint/ 2> $templog  || LogIt "ERROR: Problem in udev.lis analysis" $templog
     2677            cp -a --parents $fnllist $lis3 -t $mountpoint/ 2> $templog  || LogIt "ERROR: Problem in udev.lis analysis" $templog
    26712678            rm -f $MINDI_TMP/udev.lis
    26722679        else
     
    28642871
    28652872    if [ "$res" -eq "0" ] ; then
    2866         echo -en "\rINFO: MakeBootInitFile finished without error.      \n"
     2873        LogAll "INFO: MakeBootInitFile finished without error."
    28672874    else
    2868         echo -en "\rWARNING: MakeBootInitFile exits WITH ERRORS.           \n"
     2875        LogAll "WARNING: MakeBootInitFile exits WITH ERRORS."
    28692876    fi
    28702877    return 0
     
    33753382PrepareDataDiskImages
    33763383
    3377 export ramdisk_size=$(($size_of_all_tools+$EXTRA_SPACE))
    3378 LogFile "INFO: Ramdisk will be $ramdisk_size KB"
    3379 
    33803384MakeBootInitFile $MINDI_LIB/rootfs $MINDI_TMP/initrd.img `du -sk $kernelpath | cut -f1` || Die "Could not create initrd.img"
    33813385
Note: See TracChangeset for help on using the changeset viewer.