Changeset 1977 in MondoRescue for branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c
- Timestamp:
- Jun 2, 2008, 10:49:01 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c
r1939 r1977 56 56 57 57 extern void kill_anything_like_this(char *str); 58 extern int skip_obdr(void); 58 59 59 60 /** … … 72 73 mr_free(g_mondo_cfg_file); 73 74 mr_free(g_mountlist_fname); 75 mr_free(g_mondo_home); 74 76 mr_free(g_tmpfs_mountpt); 75 77 mr_free(g_isodir_device); … … 887 889 bkpinfo->use_star = TRUE; 888 890 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"); 889 897 } 890 898 … … 1786 1794 1787 1795 /** 1788 * Turn signal trapping on or off.1789 * @param on If TRUE, then do full cleanup when we receive a signal; if FALSE, then1790 * 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, 01797 };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 /**1814 1796 * malloc() and set sensible defaults for the mondorestore filename variables. 1815 1797 * @param bkpinfo The backup information structure. Fields used: … … 1895 1877 /************************************************************************** 1896 1878 *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_screen1907 (_("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 *1913 1879 **************************************************************************/ 1914 1880 … … 1941 1907 /************************************************************************** 1942 1908 *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 *1958 1909 **************************************************************************/ 1959 1910 … … 2011 1962 "/mnt/.boot.d", 5); 2012 1963 } 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 2013 1969 for (lino = mountlist->entries - 1; lino >= 0; lino--) { 2014 1970 if (!strcmp(mountlist->el[lino].mountpoint, "lvm")) { … … 2081 2037 // BERLIOS: below 32KB seems to block at least on RHAS 2.1 and MDK 10.0 2082 2038 2039 if (bkpinfo->use_obdr) { 2040 skip_obdr(); 2041 } 2083 2042 // tar -zxvf- 2084 2043 mr_asprintf(&command,
Note:
See TracChangeset
for help on using the changeset viewer.