Changeset 3293 in MondoRescue


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
Location:
branches/3.2
Files:
3 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
  • branches/3.2/mindi/rootfs/etc/init.d/rcS

    r3286 r3293  
    383383    mv /dev /dev.static
    384384    mkdir /dev
    385     mount -n -o size=5M,mode=0755 -t tmpfs none /dev
    386     MakeExtraNodes
    387     mount -n -t devpts -o mode=620 none /dev/pts
     385    # Contributed during LinuxCon Japan !
     386    if [ -x /usr/lib/systemd/systemd-udevd ]; then
     387        mount -n -t devtmpfs none /dev
     388    else
     389        mount -n -o size=5M,mode=0755 -t tmpfs none /dev
     390        MakeExtraNodes
     391        mount -n -t devpts -o mode=620 none /dev/pts
     392    fi
    388393    mount -n -t tmpfs  none /dev/shm
    389394    if [ -e /proc/sys/kernel/hotplug ]; then
     
    410415            # from https://github.com/hut/minirc/blob/master/rc
    411416            echo "INFO: This is the systemd version of udev"
    412             mkdir -p /run/systemd/journal
    413             mount -n -t tmpfs tmpfs /sys/fs/cgroup
     417            # Contributed during LinuxCon Japan
     418            #mkdir -p /run/systemd/journal
     419            #mount -n -t tmpfs tmpfs /sys/fs/cgroup
    414420            #mount -n -t cgroup cgroup /sys/fs/cgroup/systemd
    415421            /usr/lib/systemd/systemd-udevd --daemon
  • branches/3.2/mondo/src/common/libmondo-archive.c

    r3292 r3293  
    8418416=\"%s\" 7=%ld 8=\"%s\" 9=\"%s\" 10=\"%s\" \
    84284211=\"%s\" 12=%s 13=%ld 14=\"%s\" 15=\"%s\" 16=\"%s\" 17=\"%s\" 18=%ld 19=%d",*/
    843     mr_asprintf(command, "mindi %s --custom %s %s/images '%s' '%s' \
    844 '%s' %ld '%s' '%s' '%s' \
    845 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s' 2>&1 > %s", tmp2, bkpinfo->tmpdir,  // parameter #2
     843    mr_asprintf(command, "mindi %s --custom %s %s/images '%s' '%s' '%s' %ld '%s' '%s' '%s' '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s' '%s' 2>&1 > %s",
     844            tmp2,
     845            bkpinfo->tmpdir,    // parameter #2
    846846            bkpinfo->scratchdir,    // parameter #3
    847847            bkpinfo->kernel_path,   // parameter #4
     
    863863            use_gzip_sz,        // parameter #19 (STRING)
    864864            use_lzma_sz,        // parameter #20 (STRING)
    865             value,              // parameter #21 (STRING)
     865            value,          // parameter #21 (STRING)
    866866            MONDO_LOGFILE,      // redirect to log file
    867             MONDO_LOGFILE);
     867            );
    868868
    869869    mr_free(tmp2);
Note: See TracChangeset for help on using the changeset viewer.