Changeset 3147 in MondoRescue for branches/3.1/mondo/src/common/libmondo-tools.c
- Timestamp:
- Jun 19, 2013, 8:34:46 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/mondo/src/common/libmondo-tools.c
r2937 r3147 304 304 { 305 305 #ifdef __FreeBSD__ 306 system("kldstat | grep msdosfs || kldload msdosfs 2> /dev/null");307 system("kldstat | grep ext2fs || kldload ext2fs 2> /dev/null");306 paranoid_system("kldstat | grep msdosfs || kldload msdosfs 2> /dev/null"); 307 paranoid_system("kldstat | grep ext2fs || kldload ext2fs 2> /dev/null"); 308 308 #else 309 system("modprobe -a msdos vfat loop &> /dev/null");309 paranoid_system("modprobe -a msdos vfat loop &> /dev/null"); 310 310 #endif 311 311 } … … 643 643 colon++; 644 644 hent = gethostbyname(colon); 645 mr_asprintf( bkpinfo->netfs_user,"%s", hostname);645 mr_asprintf(&(bkpinfo->netfs_user),"%s", hostname); 646 646 } else { 647 647 hent = gethostbyname(hostname); … … 713 713 } 714 714 715 /* From busybox under GPLv2 */ 716 #ifndef HAVE_MKDTEMP 717 /* This is now actually part of POSIX.1, but was only added in 2008 */ 718 char* mkdtemp(char *template) 719 { 720 if (mktemp(template) == NULL || mkdir(template, 0700) != 0) 721 return NULL; 722 return template; 723 } 724 #endif 725 715 726 void setup_tmpdir(char *path) { 716 727 … … 721 732 /* purging a potential old tmpdir */ 722 733 log_it("Purging old tmpdir %s", bkpinfo->tmpdir); 723 chdir("/tmp"); 734 if (chdir("/tmp")) { 735 // FIXME 736 } 724 737 mr_asprintf(tmp,"rm -Rf %s",bkpinfo->tmpdir); 725 738 mr_free(bkpinfo->tmpdir); 726 (void)system(tmp);739 paranoid_system(tmp); 727 740 mr_free(tmp); 728 741 } … … 1032 1045 mr_free(tmp); 1033 1046 1034 if (!run_program_and_log_output("parted2fdisk -l | grep -i raid", 1)1047 if (!run_program_and_log_output("parted2fdisk -l 2>/dev/null | grep -i raid", 1) 1035 1048 && !does_file_exist("/etc/raidtab")) { 1036 1049 log_to_screen 1037 1050 ("You have RAID partitions but no /etc/raidtab - creating one from /proc/mdstat"); 1038 create_raidtab_from_mdstat( "/etc/raidtab");1051 create_raidtab_from_mdstat(MDSTAT_FILE,"/etc/raidtab"); 1039 1052 } 1040 1053
Note:
See TracChangeset
for help on using the changeset viewer.