Changeset 3185 in MondoRescue for branches/3.0/mondo/src/mondorestore/mondo-rstr-tools.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/mondo-rstr-tools.c
r3158 r3185 330 330 if (HDD) { 331 331 /* We need an additional param */ 332 mr_asprintf( &(bkpinfo->subdir), "%s", bkpinfo->isodir);332 mr_asprintf(bkpinfo->subdir, "%s", bkpinfo->isodir); 333 333 strcpy(bkpinfo->isodir, "/tmp/isodir"); 334 334 log_it("Now bkpinfo->isodir = %s and subdir = ", bkpinfo->isodir, bkpinfo->subdir); … … 383 383 log_to_screen("WARNING - isodir is already mounted"); 384 384 } else { 385 mr_asprintf( &mount_isodir_command, "mount %s", g_isodir_device);385 mr_asprintf(mount_isodir_command, "mount %s", g_isodir_device); 386 386 if (strlen(g_isodir_format) > 1) { 387 387 mr_strcat(mount_isodir_command, " -t %s", g_isodir_format); … … 478 478 log_msg(1, tmp); 479 479 /* Deal with additional params only if not /proc or /sys */ 480 mr_asprintf( &additional_parameters, "");480 mr_asprintf(additional_parameters, ""); 481 481 if (strcmp(format, "proc") && strcmp(format, "sys")) { 482 482 if (writeable) { … … 586 586 "", mountlist->entries); 587 587 588 mr_asprintf( &these_failed, "");588 mr_asprintf(these_failed, ""); 589 589 for (lino = 0; lino < mountlist->entries; lino++) { 590 590 if (!strcmp(mountlist->el[lino].device, "/proc")) { … … 766 766 bkpinfo->please_dont_eject = TRUE; 767 767 if (read_cfg_var(cfg_file, "netfs-proto", value) == 0) { 768 mr_asprintf( &(bkpinfo->netfs_proto),"%s", value);768 mr_asprintf(bkpinfo->netfs_proto,"%s", value); 769 769 } else { 770 770 /* For compatibility, force protocol in old nfs case to be transparent */ 771 mr_asprintf( &(bkpinfo->netfs_proto), "nfs");771 mr_asprintf(bkpinfo->netfs_proto, "nfs"); 772 772 } 773 773 if (read_cfg_var(cfg_file, "netfs-server-user", value) == 0) { 774 mr_asprintf( &(bkpinfo->netfs_user),"%s", value);774 mr_asprintf(bkpinfo->netfs_user,"%s", value); 775 775 } 776 776 if (read_cfg_var(cfg_file, "iso-prefix", value) == 0) { … … 851 851 read_cfg_var(cfg_file, "acl", value); 852 852 if (strstr(value, "TRUE")) { 853 mr_asprintf( &g_getfacl,"setfacl");853 mr_asprintf(g_getfacl,"setfacl"); 854 854 log_msg(1, "We will restore ACLs"); 855 855 if (! find_home_of_exe("setfacl")) { … … 859 859 read_cfg_var(cfg_file, "xattr", value); 860 860 if (strstr(value, "TRUE")) { 861 mr_asprintf( &g_getfattr,"setfattr");861 mr_asprintf(g_getfattr,"setfattr"); 862 862 log_msg(1, "We will restore XATTRs"); 863 863 if (! find_home_of_exe("setfattr")) { … … 1370 1370 * the current /dev location 1371 1371 */ 1372 mr_asprintf( &cmd,"tar cf - /dev | ( cd %s ; tar xf - )",MNT_RESTORING);1372 mr_asprintf(cmd,"tar cf - /dev | ( cd %s ; tar xf - )",MNT_RESTORING); 1373 1373 run_program_and_log_output(cmd, 3); 1374 1374 paranoid_free(cmd); … … 1385 1385 read_cfg_var(g_mondo_cfg_file, "bootloader.device", device); 1386 1386 read_cfg_var(g_mondo_cfg_file, "bootloader.name", name); 1387 mr_asprintf( &tmp, "run_boot_loader: device='%s', name='%s'", device, name);1387 mr_asprintf(tmp, "run_boot_loader: device='%s', name='%s'", device, name); 1388 1388 log_msg(2, tmp); 1389 1389 paranoid_free(tmp); … … 1402 1402 #ifdef __FreeBSD__ 1403 1403 else if (!strcmp(name, "BOOT0")) { 1404 mr_asprintf( &tmp, "boot0cfg -B %s", device);1404 mr_asprintf(tmp, "boot0cfg -B %s", device); 1405 1405 res = run_program_and_log_output(tmp, FALSE); 1406 1406 paranoid_free(tmp); 1407 1407 } else { 1408 mr_asprintf( &tmp, "ls /dev | grep -Eq '^%ss[1-4].*'", device);1408 mr_asprintf(tmp, "ls /dev | grep -Eq '^%ss[1-4].*'", device); 1409 1409 if (!system(tmp)) { 1410 1410 paranoid_free(tmp); 1411 mr_asprintf( &tmp, MNT_RESTORING "/sbin/fdisk -B %s", device);1411 mr_asprintf(tmp, MNT_RESTORING "/sbin/fdisk -B %s", device); 1412 1412 res = run_program_and_log_output(tmp, 3); 1413 1413 } else { … … 2056 2056 paranoid_system("sync"); 2057 2057 2058 mr_asprintf( &tmp, "cp -f %s " MNT_RESTORING "/var/log", MONDO_LOGFILE);2058 mr_asprintf(tmp, "cp -f %s " MNT_RESTORING "/var/log", MONDO_LOGFILE); 2059 2059 if (run_program_and_log_output(tmp, FALSE)) { 2060 2060 log_msg(1, … … 2075 2075 continue; 2076 2076 } 2077 mr_asprintf( &tmp, "Unmounting device %s ", mountlist->el[lino].device);2077 mr_asprintf(tmp, "Unmounting device %s ", mountlist->el[lino].device); 2078 2078 2079 2079 update_progress_form(tmp);
Note:
See TracChangeset
for help on using the changeset viewer.