Changeset 2907 in MondoRescue
- Timestamp:
- Nov 29, 2011, 2:58:39 AM (13 years ago)
- Location:
- branches/3.0
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mindi/mindi
r2906 r2907 1026 1026 1027 1027 MakeMountlist() { 1028 local scratchdirmountlist all_partitions current_partition \1028 local mountlist all_partitions current_partition \ 1029 1029 partition_size partition_format outstring partition_number \ 1030 1030 partition_mountpt c_p lwm_info psz lvm_dev unofficial_outstring \ … … 1037 1037 echo "-----------------------------------" >> $LOGFILE 1038 1038 1039 # scratchdir, mountlist(OUT) 1040 scratchdir=$MINDI_TMP 1039 # mountlist(OUT) 1041 1040 mountlist=$1 1042 1041 -
branches/3.0/mondo/src/common/libmondo-archive.c
r2881 r2907 1582 1582 log_msg(2, "make_usb_fs --- scratchdir=%s", bkpinfo->scratchdir); 1583 1583 (void) getcwd(old_pwd, MAX_STR_LEN - 1); 1584 mr_asprintf(&tmp, "chmod 7 55%s", bkpinfo->scratchdir);1584 mr_asprintf(&tmp, "chmod 700 %s", bkpinfo->scratchdir); 1585 1585 run_program_and_log_output(tmp, FALSE); 1586 1586 paranoid_free(tmp); … … 1719 1719 bkpinfo->scratchdir, destfile); 1720 1720 (void) getcwd(old_pwd, MAX_STR_LEN - 1); 1721 sprintf(tmp, "chmod 7 44%s", bkpinfo->scratchdir);1721 sprintf(tmp, "chmod 700 %s", bkpinfo->scratchdir); 1722 1722 run_program_and_log_output(tmp, FALSE); 1723 1723 chdir(bkpinfo->scratchdir); -
branches/3.0/mondo/src/common/libmondo-cli.c
r2877 r2907 106 106 } 107 107 // } 108 /* Before erasing dirs go into a safe place */ 109 chdir("/tmp"); 108 110 sprintf(tmp, "rm -Rf %s/tmp.mondo.*", bkpinfo->tmpdir); 109 111 paranoid_system(tmp); … … 808 810 809 811 if (flag_set['S']) { 812 /* Before changing remove old ones if any */ 813 if (bkpinfo->scratchdir) { 814 chdir("/tmp"); 815 mr_asprintf(&tmp, "rm -Rf %s", bkpinfo->scratchdir); 816 paranoid_system(tmp); 817 mr_free(tmp); 818 } 810 819 sprintf(bkpinfo->scratchdir, "%s/mondo.scratch.%ld", flag_val['S'], 811 820 random() % 32768); -
branches/3.0/mondo/src/common/libmondo-devices.c
r2878 r2907 2973 2973 log_it("bkpinfo->tmpdir is being set to %s", bkpinfo->tmpdir); 2974 2974 2975 /* Before changing remove old ones if any */ 2976 if (bkpinfo->scratchdir) { 2977 chdir("/tmp"); 2978 mr_asprintf(&tmp, "rm -Rf %s", bkpinfo->scratchdir); 2979 paranoid_system(tmp); 2980 mr_free(tmp); 2981 } 2975 2982 sprintf(bkpinfo->scratchdir, "%s/mondo.scratch.%d", tmp, 2976 2983 (int) (random() % 32768)); -
branches/3.0/mondo/src/common/libmondo-tools.c
r2848 r2907 733 733 /* purging a potential old tmpdir */ 734 734 log_it("Purging old tmpdir %s", bkpinfo->tmpdir); 735 chdir("/tmp"); 735 736 mr_asprintf(&tmp,"rm -Rf %s",bkpinfo->tmpdir); 736 737 (void)system(tmp); -
branches/3.0/mondo/src/common/newt-specific.c
r2901 r2907 405 405 /* newtPopHelpLine(); */ 406 406 407 chdir("/"); 407 /* Before removing dir, make sure we're out of them */ */ 408 chdir("/tmp"); 408 409 run_program_and_log_output("umount -d " MNT_CDROM, FALSE); 409 410 if (g_selfmounted_isodir) { … … 429 430 log_msg(8,"tempdir is %s",bkpinfo->tmpdir); 430 431 if (strstr(bkpinfo->tmpdir ,"mondo.tmp.") != NULL) { 431 log_msg(8,"erasing tempdir ");432 log_msg(8,"erasing tempdir %s",bkpinfo->tmpdir); 432 433 mr_asprintf(&command, "rm -Rf %s", bkpinfo->tmpdir); 433 434 system(command); … … 438 439 log_msg(8,"scratchdir is %s", bkpinfo->scratchdir); 439 440 if (strstr(bkpinfo->scratchdir ,"mondo.scratch.") != NULL) { 440 log_msg(8,"erasing scratchdir ");441 log_msg(8,"erasing scratchdir %s",bkpinfo->scratchdir); 441 442 mr_asprintf(&command, "rm -Rf %s", bkpinfo->scratchdir); 442 443 system(command);
Note:
See TracChangeset
for help on using the changeset viewer.