Changeset 1924 in MondoRescue for branches/stable/mondo/src/common


Ignore:
Timestamp:
Apr 18, 2008, 1:41:41 AM (17 years ago)
Author:
Bruno Cornec
Message:

svn merge -r 1902:1923 $SVN_M/branches/2.2.6

Location:
branches/stable/mondo/src/common
Files:
6 edited
3 copied

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/Makefile.am

    r1056 r1924  
    1313                       libmondo-mountlist.c libmondo-raid.c \
    1414                       libmondo-stream.c libmondo-string.c libmondo-tools.c \
    15                        libmondo-verify.c newt-specific.c \
     15                       libmondo-verify.c newt-specific.c libmondo-cli.c \
    1616                       libmondo-archive.h libmondo-devices.h \
    1717                       libmondo-filelist.h libmondo-files.h libmondo-fork.h \
    1818                       libmondo-gui.h libmondo-mountlist.h libmondo-raid.h \
    1919                       libmondo-stream.h libmondo-string.h libmondo-tools.h \
    20                        libmondo-verify.h libmondo-fifo.h \
     20                       libmondo-verify.h libmondo-fifo.h libmondo-cli.h \
    2121                       libmondo-archive-EXT.h my-stuff.h mondostructures.h \
    2222                       libmondo-devices-EXT.h libmondo-fifo-EXT.h \
     
    2525                       libmondo-mountlist-EXT.h libmondo-raid-EXT.h  \
    2626                       libmondo-string-EXT.h libmondo-tools-EXT.h \
    27                        libmondo-verify-EXT.h  libmondo-stream-EXT.h \
     27                       libmondo-verify-EXT.h  libmondo-stream-EXT.h libmondo-cli-EXT.h \
    2828                       newt-specific.h
  • branches/stable/mondo/src/common/libmondo-devices.c

    r1903 r1924  
    6161 */
    6262bool g_restoring_live_from_cd = FALSE;
     63bool g_restoring_live_from_nfs = FALSE;
    6364
    6465extern t_bkptype g_backup_media_type;   // set by main()
     
    18521853                }
    18531854            } else {
    1854                 sz_size = 0;
     1855                strcpy(sz_size, "0");
    18551856            }
    18561857            mr_free(comment);
  • branches/stable/mondo/src/common/libmondo-filelist.c

    r1903 r1924  
    15901590        mr_asprintf(&tmp2, call_program_and_get_last_line_of_output("mount | grep -Ew 'ntfs|fat|vfat|dos' | awk '{print $3}'"));
    15911591        if (strlen(tmp2) < 1) {
    1592             mr_asprintf(&tmp1,"");
     1592            mr_asprintf(&tmp1," ");
    15931593        } else {
    15941594            mr_msg(2, "Found windows FS: %s",tmp2);
  • branches/stable/mondo/src/common/libmondo-mountlist.c

    r1904 r1924  
    843843#if linux
    844844        sscanf(incoming,
    845                "%s %s %s %s %s %s",
     845               "%s %s %s %s %s",
    846846               mountlist->el[items].device,
    847847               mountlist->el[items].mountpoint,
     
    909909                     mountlist->el[items].format,
    910910                     mountlist->el[items].size,
    911                     mountlist->el[items].label);
     911                     mountlist->el[items].label);
    912912            items++;
    913913        }
     
    948948    for (i = 0; i < mountlist->entries; i++) {
    949949        fprintf(fout,
    950                 "%-15s %-15s %-15s %-15lld %-15s %-15s\n",
     950                "%-15s %-15s %-15s %-15lld %-15s\n",
    951951                mountlist->el[i].device, mountlist->el[i].mountpoint,
    952952                mountlist->el[i].format, mountlist->el[i].size,
  • branches/stable/mondo/src/common/libmondo-stream.c

    r1904 r1924  
    695695    (void) getcwd(old_cwd, MAX_STR_LEN);
    696696    chdir(bkpinfo->tmpdir);
    697     mr_asprintf(&tmp, "tar -zxf %s tmp/mondo-restore.cfg 2> /dev/null",
     697    mr_asprintf(&tmp, "tar -zxf %s ./tmp/mondo-restore.cfg 2> /dev/null",
    698698             outfname);
    699699    paranoid_system(tmp);
  • branches/stable/mondo/src/common/libmondo-tools.c

    r1903 r1924  
    2121#include "libmondo-fork-EXT.h"
    2222#include "libmondo-raid-EXT.h"
     23#include "libmondo-devices-EXT.h"
    2324#include <sys/socket.h>
    2425#include <netdb.h>
     
    7879
    7980extern bool am_I_in_disaster_recovery_mode(void);
     81
     82/* Return a string containing the date */
     83char *mr_date(void) {
     84
     85        time_t tcurr;
     86
     87        tcurr = time(NULL);
     88        return(ctime(&tcurr));
     89}
     90
     91/*-----------------------------------------------------------*/
    8092
    8193
     
    692704    strcpy(bkpinfo->tmpdir,p);
    693705    paranoid_free(tmp);
    694 
    695     //sprintf(bkpinfo->tmpdir, "%s/tmpfs/mondo.tmp.%d", "/tmp", (int) (random() % 32768));  // for mondorestore
    696706}
    697707
     
    711721    memset((void *) bkpinfo, 0, sizeof(struct s_bkpinfo));
    712722
    713     /* special case for tmpdir as used eveywhere after */
    714     setup_tmpdir(NULL);
     723    sensibly_set_tmpdir_and_scratchdir();
    715724
    716725    bkpinfo->manual_tray = mr_conf->manual_tray;
     
    764773    bkpinfo->prefix = tmp;
    765774
    766     bkpinfo->scratchdir[0] = '\0';
    767775    bkpinfo->make_filelist = TRUE;  // unless -J supplied to mondoarchive
    768776    bkpinfo->optimal_set_size = 0;
     
    823831 * - make sure afio, cdrecord, bzip2, awk, md5sum, strings, mindi, and buffer exist
    824832 * - make sure CD-ROM is unmounted
    825  * - make sure /etc/modules.conf exists
    826833 * - make sure user's mountlist is OK by running <tt>mindi --makemountlist</tt>
    827834 *
     
    940947    }
    941948    mr_free(tmp);
    942 #ifndef __FreeBSD__
    943     if (!does_file_exist("/etc/modules.conf")) {
    944         if (does_file_exist("/etc/conf.modules")) {
    945             log_it("Linking /etc/modules.conf to /etc/conf.modules");
    946             run_program_and_log_output
    947                 ("ln -sf /etc/conf.modules /etc/modules.conf", 5);
    948         } else if (does_file_exist("/etc/modprobe.d")) {
    949             log_it
    950                 ("Directory /etc/modprobe.d found. mindi will use its contents.");
    951         } else if (does_file_exist("/etc/modprobe.conf")) {
    952             log_it("Linking /etc/modules.conf to /etc/modprobe.conf");
    953             run_program_and_log_output
    954                 ("ln -sf /etc/modprobe.conf /etc/modules.conf", 5);
    955         } else {
    956             retval++;
    957             log_to_screen
    958                 (_("Please find out what happened to /etc/modules.conf"));
    959         }
    960     }
    961 #endif
    962949
    963950    run_program_and_log_output("cat /etc/fstab", 5);
Note: See TracChangeset for help on using the changeset viewer.