Changeset 3293 in MondoRescue for branches/3.2/mindi/mindi


Ignore:
Timestamp:
May 27, 2014, 5:53:16 PM (10 years ago)
Author:
Bruno Cornec
Message:
  • Fix mount call in rcS to use devtmpfs instead of tmpfs for /dev and systemd
  • Changing how logging is done in mindi to support being called by mondo AND printing percentage progress in UI
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3292 r3293  
    914914
    915915LogProgress() {
    916     local i progress modres noof_lines
     916    local i progress modres noof_lines title
    917917 
    918918    progress=$1
    919919    noof_lines=$2
    920 
    921     echo -en "\r\t\t\t\t\t\t\t\t"
     920    title=$3
     921
    922922    i=$(($progress*100))
    923923    if [ $noof_lines -ne 0 ]; then
     
    926926        i=0
    927927    fi
    928     echo -en "$i"
    929     echo -en "%"
    930     modres=$(($progress%4))
    931     [ "$modres" -eq "0" ] && echo -en "\t/"
    932     [ "$modres" -eq "1" ] && echo -en "\t-"
    933     [ "$modres" -eq "2" ] && echo -en "\t\\"
    934     [ "$modres" -eq "3" ] && echo -en "\t|"
     928
     929    if [ _"$MONDO_SHARE" != _"" ]; then
     930        echo "$title        $i%"
     931    else
     932        echo -en "\r\t\t\t\t\t\t\t\t"
     933        echo -en "$i"
     934        echo -en "%"
     935        modres=$(($progress%4))
     936        [ "$modres" -eq "0" ] && echo -en "\t/"
     937        [ "$modres" -eq "1" ] && echo -en "\t-"
     938        [ "$modres" -eq "2" ] && echo -en "\t\\"
     939        [ "$modres" -eq "3" ] && echo -en "\t|"
     940    fi
    935941}
    936942
Note: See TracChangeset for help on using the changeset viewer.