Changeset 3195 in MondoRescue for branches/3.2
- Timestamp:
- Sep 30, 2013, 9:07:23 AM (11 years ago)
- Location:
- branches/3.2/mondo/src/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/common/libmondo-fork.c
r3194 r3195 249 249 if (!program[0]) { 250 250 log_msg(2, "Warning - asked to run zerolength program"); 251 return 251 return(1); 252 252 } 253 253 … … 312 312 } 313 313 } 314 return 314 return(res); 315 315 } 316 316 -
branches/3.2/mondo/src/common/libmondo-tools.c
r3194 r3195 707 707 char *p = NULL; 708 708 709 if (bkpinfo->tmpdir != NULL) {709 if (bkpinfo->tmpdir[0] != '\0') { 710 710 /* purging a potential old tmpdir */ 711 711 if (chdir("/tmp")) { … … 735 735 p = mkdtemp(tmp); 736 736 if (p == NULL) { 737 log_it("Failed to create global tmp directory %s for Mondo.",tmp);737 printf("Failed to create global tmp directory %s for Mondo.",tmp); 738 738 mr_free(tmp); 739 739 finish(-1); 740 740 } 741 strcpy(bkpinfo->tmpdir,p); 741 742 mr_free(tmp); 742 743 743 strcpy(bkpinfo->tmpdir,p);744 744 log_it("bkpinfo->tmpdir is being set to %s", bkpinfo->tmpdir); 745 745 … … 799 799 void reset_bkpinfo() 800 800 { 801 log_msg(1, "Initializing bkpinfo");802 803 801 assert(bkpinfo != NULL); 804 802 memset((void *) bkpinfo, 0, sizeof(struct s_bkpinfo)); … … 822 820 823 821 /* We need tmpdir as early as possible for further function calls */ 824 bkpinfo->tmpdir[0] = '\0'; // Really setup after825 bkpinfo->scratchdir[0] = '\0'; // Really setup after822 bkpinfo->tmpdir[0] = '\0'; // Really setup after 823 bkpinfo->scratchdir[0] = '\0'; // Really setup after 826 824 setup_tmpdir(NULL); 827 825 setup_scratchdir(NULL); … … 919 917 int retval = 0; 920 918 921 mvaddstr_and_log_it(g_currentY, 0, 922 "Checking sanity of your Linux distribution"); 919 mvaddstr_and_log_it(g_currentY, 0, "Checking sanity of your Linux distribution"); 923 920 #ifndef __FreeBSD__ 924 921 if (system("which mkfs.vfat 2> /dev/null 1> /dev/null") … … 950 947 /* Some SuSE have ramdisk as modules, so insert it first, then test again */ 951 948 run_program_and_log_output("modprobe brd 2> /dev/null > /dev/null",FALSE); 952 if (run_program_and_log_output 953 ("grep ramdisk /proc/devices", FALSE)) { 954 if (!ask_me_yes_or_no 955 ("Your kernel has no ramdisk support. That's mind-numbingly stupid but I'll allow it if you're planning to use a failsafe kernel. Are you?")) 956 { 949 if (run_program_and_log_output("grep ramdisk /proc/devices", FALSE)) { 950 if (!ask_me_yes_or_no("Your kernel has no ramdisk support. That's mind-numbingly stupid but I'll allow it if you're planning to use a failsafe kernel. Are you?")) { 957 951 // retval++; 958 log_to_screen 959 ("It looks as if your kernel lacks ramdisk and initrd support."); 960 log_to_screen 961 ("I'll allow you to proceed but FYI, if I'm right, your kernel is broken."); 952 log_to_screen("It looks as if your kernel lacks ramdisk and initrd support."); 953 log_to_screen("I'll allow you to proceed but FYI, if I'm right, your kernel is broken."); 962 954 } 963 955 } … … 992 984 if (strcmp("", tmp)) { 993 985 if (strstr(tmp, "autofs")) { 994 log_to_screen 995 ("Your CD-ROM is mounted via autofs. I therefore cannot tell"); 996 log_to_screen 997 ("if a CD actually is inserted. If a CD is inserted, please"); 986 log_to_screen("Your CD-ROM is mounted via autofs. I therefore cannot tell"); 987 log_to_screen("if a CD actually is inserted. If a CD is inserted, please"); 998 988 log_to_screen("eject it. Thank you."); 999 log_it 1000 ("Ignoring autofs CD-ROM 'mount' since we hope nothing's in it."); 989 log_it("Ignoring autofs CD-ROM 'mount' since we hope nothing's in it."); 1001 990 } else 1002 991 if (run_program_and_log_output("uname -a | grep Knoppix", 5)) { … … 1017 1006 if (run_program_and_log_output("mindi -V", 1)) { 1018 1007 log_to_screen("Could not ascertain mindi's version number."); 1019 log_to_screen 1020 ("You have not installed Mondo and/or Mindi properly."); 1008 log_to_screen("You have not installed Mondo and/or Mindi properly."); 1021 1009 log_to_screen("Please uninstall and reinstall them both."); 1022 1010 fatal_error("Please reinstall Mondo and Mindi."); … … 1024 1012 mr_asprintf(tmp, "mindi --makemountlist %s/mountlist.txt.test", bkpinfo->tmpdir); 1025 1013 if (run_program_and_log_output(tmp, 5)) { 1014 log_to_screen("%s failed for some reason.", tmp); 1026 1015 mr_free(tmp); 1027 mr_asprintf(tmp, "mindi --makemountlist %s/mountlist.txt.test failed for some reason.", bkpinfo->tmpdir); 1028 log_to_screen(tmp); 1029 log_to_screen 1030 ("Please run that command by hand and examine /var/log/mindi.log"); 1031 log_to_screen 1032 ("for more information. Perhaps your /etc/fstab file is insane."); 1033 log_to_screen 1034 ("Perhaps Mindi's MakeMountlist() subroutine has a bug. We'll see."); 1016 log_to_screen("Please run that command by hand and examine /var/log/mindi.log"); 1017 log_to_screen("for more information. Perhaps your /etc/fstab file is insane."); 1018 log_to_screen("Perhaps Mindi's MakeMountlist() subroutine has a bug. We'll see."); 1035 1019 retval++; 1036 1020 } 1037 1021 mr_free(tmp); 1038 1022 1039 if (!run_program_and_log_output("parted2fdisk -l 2>/dev/null | grep -i raid", 1) 1040 && !does_file_exist("/etc/raidtab")) { 1041 log_to_screen 1042 ("You have RAID partitions but no /etc/raidtab - creating one from /proc/mdstat"); 1023 if (!run_program_and_log_output("parted2fdisk -l 2>/dev/null | grep -i raid", 1) && !does_file_exist("/etc/raidtab")) { 1024 log_to_screen("You have RAID partitions but no /etc/raidtab - creating one from /proc/mdstat"); 1043 1025 create_raidtab_from_mdstat(MDSTAT_FILE,"/etc/raidtab"); 1044 1026 }
Note:
See TracChangeset
for help on using the changeset viewer.