Changeset 3279 for branches/3.2


Ignore:
Timestamp:
Apr 30, 2014, 1:05:17 PM (5 years ago)
Author:
bruno
Message:
  • flaws_str should be NULL if no error detected not ""
  • Try to redirect back fd at restore time before launching mondorestore to avoid garbage in log
Location:
branches/3.2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/rootfs/etc/init.d/rcS

    r3278 r3279  
    877877# Creates log file
    878878LogIt ""
     879# Backup fd
     880exec 4>&2 5>&1
    879881# Redirect every message to the LOGFILE
    880882exec > >(tee -a ${LOGFILE})
  • branches/3.2/mindi/rootfs/usr/sbin/post-init

    r3271 r3279  
    44#
    55#------------------------------------------------------------
    6 
    7 
    8 sleep 1
    96
    107if [ -f "/tmp/mountlist.txt" ]; then
     
    7067fi
    7168
     69# Now suppress msg redirection to avoid poluting log file
     70exec 2>&4 >&5 4>&- 5>&-
     71
    7272if [ "$compare" ] ; then
    7373    LogIt "------------------COMPARE MODE-----------------" 1
  • branches/3.2/mindi/rootfs/usr/sbin/start-netfs

    r3278 r3279  
    117117    elif [ "$proto" = "smbfs" ]; then
    118118        LogIt "Mounting SMBFS share ($netfsmount) on /tmp/isodir..."
    119         mount -t cifs $netfsopt $netfsmount /tmp/isodir -o ro
     119        mount -t cifs $netfsmount /tmp/isodir -o ro $netfsopt
    120120    elif [ "$proto" != "" ]; then
    121121        if [ -x /sbin/rpcbind ]; then
  • branches/3.2/mondo/src/common/libmondo-mountlist.c

    r3263 r3279  
    556556    drivelist = malloc(sizeof(struct list_of_disks));
    557557    assert(mountlist != NULL);
    558     mr_asprintf(flaws_str, "%s", "");
    559558
    560559    make_list_of_drives_in_mountlist(mountlist, drivelist);
     
    573572        if (tmp != NULL) {
    574573            log_msg(8,"Adding: %s to flaws_str", tmp);
    575             mr_strcat(flaws_str, "%s", tmp);
     574            if (flaws_str != NULL) {
     575                mr_strcat(flaws_str, "%s", tmp);
     576            } else {
     577                mr_asprintf(flaws_str, "%s", tmp);
     578            }
    576579            mr_free(tmp);
    577580        }
     
    591594        if (copies > 1 && last_copy == currline && strcmp(curr_mountpoint, "raid")) {
    592595            mr_asprintf(tmp, " %s %s's.", number_to_text(copies), curr_mountpoint);
    593             mr_strcat(flaws_str, "%s", tmp);
    594596            log_msg(8,"Adding: %s to flaws_str", tmp);
     597            if (flaws_str != NULL) {
     598                mr_strcat(flaws_str, "%s", tmp);
     599            } else {
     600                mr_asprintf(flaws_str, "%s", tmp);
     601            }
    595602            mr_free(tmp);
    596603        }
    597604        mr_free(curr_mountpoint);
    598605    }
    599 
    600606    return(flaws_str);
    601607}
Note: See TracChangeset for help on using the changeset viewer.