Ignore:
Timestamp:
Jun 2, 2008, 10:49:01 AM (12 years ago)
Author:
Bruno Cornec
Message:

svn merge -r 1938:1976 $SVN_M/branches/2.2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c

    r1939 r1977  
    5656
    5757extern void kill_anything_like_this(char *str);
     58extern int skip_obdr(void);
    5859
    5960/**
     
    7273    mr_free(g_mondo_cfg_file);
    7374    mr_free(g_mountlist_fname);
     75    mr_free(g_mondo_home);
    7476    mr_free(g_tmpfs_mountpt);
    7577    mr_free(g_isodir_device);
     
    887889        bkpinfo->use_star = TRUE;
    888890        mr_msg(1, "Goody! ... bkpinfo->use_star is now true.");
     891    }
     892
     893    read_cfg_var(cfg_file, "obdr", value);
     894    if (strstr(value, "yes")) {
     895        bkpinfo->use_obdr = TRUE;
     896        log_msg(1, "OBDR mode activated");
    889897    }
    890898
     
    17861794
    17871795/**
    1788  * Turn signal trapping on or off.
    1789  * @param on If TRUE, then do full cleanup when we receive a signal; if FALSE, then
    1790  * print a message and exit immediately.
    1791  */
    1792 void set_signals(int on)
    1793 {
    1794     int signals[] =
    1795         { SIGKILL, SIGPIPE, SIGTERM, SIGHUP, SIGTRAP, SIGABRT, SIGINT,
    1796         SIGSTOP, 0
    1797     };
    1798     int i;
    1799     for (i = 0; signals[i]; i++) {
    1800         if (on) {
    1801             signal(signals[i], terminate_daemon);
    1802         } else {
    1803             signal(signals[i], termination_in_progress);
    1804         }
    1805     }
    1806 }
    1807 
    1808 /**************************************************************************
    1809  *END_SET_SIGNALS                                                         *
    1810  **************************************************************************/
    1811 
    1812 
    1813 /**
    18141796 * malloc() and set sensible defaults for the mondorestore filename variables.
    18151797 * @param bkpinfo The backup information structure. Fields used:
     
    18951877/**************************************************************************
    18961878 *END_STREAMLINE_CHANGES_FILE                                             *
    1897  **************************************************************************/
    1898 
    1899 
    1900 /**
    1901  * Exit due to a signal (normal cleanup).
    1902  * @param sig The signal we're exiting due to.
    1903  */
    1904 void terminate_daemon(int sig)
    1905 {
    1906     log_to_screen
    1907         (_("Mondorestore is terminating in response to a signal from the OS"));
    1908     free_MR_global_filenames();
    1909     finish(254);
    1910 }
    1911 /**************************************************************************
    1912  *END_TERMINATE_DAEMON                                                    *
    19131879 **************************************************************************/
    19141880
     
    19411907/**************************************************************************
    19421908 *END_TWENTY_SECONDS_TIL_YIKES                                            *
    1943  **************************************************************************/
    1944 
    1945 
    1946 /**
    1947  * Exit due to a signal (no cleanup).
    1948  * @param sig The signal we're exiting due to.
    1949  */
    1950 void termination_in_progress(int sig)
    1951 {
    1952     mr_msg(1, "Termination in progress");
    1953     usleep(1000);
    1954     pthread_exit(0);
    1955 }
    1956 /**************************************************************************
    1957  *END_TERMINATION_IN_PROGRESS                                             *
    19581909 **************************************************************************/
    19591910
     
    20111962                                   "/mnt/.boot.d", 5);
    20121963    }
     1964
     1965    /* Unmounting the local /proc and /sys first */
     1966    run_program_and_log_output("umount " MNT_RESTORING "/proc",3);
     1967    run_program_and_log_output("umount " MNT_RESTORING "/sys",3);
     1968
    20131969    for (lino = mountlist->entries - 1; lino >= 0; lino--) {
    20141970        if (!strcmp(mountlist->el[lino].mountpoint, "lvm")) {
     
    20812037    // BERLIOS: below 32KB seems to block at least on RHAS 2.1 and MDK 10.0
    20822038
     2039    if (bkpinfo->use_obdr) {
     2040        skip_obdr();
     2041    }
    20832042    // tar -zxvf-
    20842043    mr_asprintf(&command,
Note: See TracChangeset for help on using the changeset viewer.