Changeset 3185 in MondoRescue for branches/3.0/mondo/src/mondorestore/mondorestore.c
- Timestamp:
- Sep 20, 2013, 2:29:57 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mondo/src/mondorestore/mondorestore.c
r3158 r3185 354 354 355 355 /* Clean up blkid cache file if they exist */ 356 mr_asprintf( &tmp1,"%s/etc/blkid.tab",bkpinfo->restore_path);356 mr_asprintf(tmp1,"%s/etc/blkid.tab",bkpinfo->restore_path); 357 357 (void)unlink(tmp1); 358 358 paranoid_free(tmp1); 359 mr_asprintf( &tmp1,"%s/etc/blkid.tab.old",bkpinfo->restore_path);359 mr_asprintf(tmp1,"%s/etc/blkid.tab.old",bkpinfo->restore_path); 360 360 (void)unlink(tmp1); 361 361 paranoid_free(tmp1); … … 369 369 370 370 /* Clean up multiconf cache file if they exist */ 371 mr_asprintf( &tmp1,"%s/var/lib/multipath/bindings",bkpinfo->restore_path);371 mr_asprintf(tmp1,"%s/var/lib/multipath/bindings",bkpinfo->restore_path); 372 372 (void)unlink(tmp1); 373 373 paranoid_free(tmp1); 374 374 375 375 /* Edit multipath.conf if needed to adapt wwid */ 376 mr_asprintf( &tmp1,"%s/etc/multipath.conf", MNT_RESTORING);376 mr_asprintf(tmp1,"%s/etc/multipath.conf", MNT_RESTORING); 377 377 if (does_file_exist(tmp1)) { 378 378 log_msg(2, "We may need to clean /etc/multipath.conf"); … … 384 384 385 385 if (bkpinfo->restore_mode != nuke) { 386 mr_asprintf( &editor, "%s", find_my_editor());387 mr_asprintf( &tmp1,"chroot %s %s /etc/multipath.conf", MNT_RESTORING, editor);386 mr_asprintf(editor, "%s", find_my_editor()); 387 mr_asprintf(tmp1,"chroot %s %s /etc/multipath.conf", MNT_RESTORING, editor); 388 388 popup_and_OK("You will now edit multipath.conf"); 389 389 if (!g_text_mode) { … … 1670 1670 use_star = (strstr(tarball_fname, ".star")) ? TRUE : FALSE; 1671 1671 // sprintf(files_to_restore_this_time_fname, "/tmp/ftrttf.%d.%d", (int)getpid(), (int)random()); 1672 mr_asprintf( &command, "mkdir -p %s/tmp", MNT_RESTORING);1672 mr_asprintf(command, "mkdir -p %s/tmp", MNT_RESTORING); 1673 1673 run_program_and_log_output(command, 9); 1674 1674 paranoid_free(command); … … 1757 1757 // if (strstr(tarball_fname, ".star.")) 1758 1758 if (use_star) { 1759 mr_asprintf( &command, "star -x -force-remove -sparse -U " STAR_ACL_SZ " file=%s", tarball_fname);1759 mr_asprintf(command, "star -x -force-remove -sparse -U " STAR_ACL_SZ " file=%s", tarball_fname); 1760 1760 if (strstr(tarball_fname, ".bz2")) { 1761 1761 mr_strcat(command, " -bz"); … … 1763 1763 } else { 1764 1764 if (filelist_subset_fname[0] != '\0') { 1765 mr_asprintf( &command, "afio -i -M 8m -b %ld -c %ld %s -w '%s' %s", TAPE_BLOCK_SIZE, BUFSIZE, executable, filelist_subset_fname, tarball_fname);1765 mr_asprintf(command, "afio -i -M 8m -b %ld -c %ld %s -w '%s' %s", TAPE_BLOCK_SIZE, BUFSIZE, executable, filelist_subset_fname, tarball_fname); 1766 1766 } else { 1767 mr_asprintf( &command, "afio -i -b %ld -c %ld -M 8m %s %s", TAPE_BLOCK_SIZE, BUFSIZE, executable, tarball_fname);1767 mr_asprintf(command, "afio -i -b %ld -c %ld -M 8m %s %s", TAPE_BLOCK_SIZE, BUFSIZE, executable, tarball_fname); 1768 1768 } 1769 1769 } … … 1818 1818 // Be verbose for star 1819 1819 if (retval || use_star) { 1820 mr_asprintf( &command, "cat %s >> %s", temp_log, MONDO_LOGFILE);1820 mr_asprintf(command, "cat %s >> %s", temp_log, MONDO_LOGFILE); 1821 1821 paranoid_system(command); 1822 1822 paranoid_free(command); … … 2310 2310 filelist); 2311 2311 } 2312 mr_asprintf( &tmp1, "%s #%d, fileset #%ld - restore ",2312 mr_asprintf(tmp1, "%s #%d, fileset #%ld - restore ", 2313 2313 mds, g_current_media_number, current_tarball_number); 2314 2314 if (res) {
Note:
See TracChangeset
for help on using the changeset viewer.