Changeset 689 in MondoRescue for trunk/mondo/mondo/mondorestore
- Timestamp:
- Jul 17, 2006, 7:43:58 PM (18 years ago)
- Location:
- trunk/mondo/mondo/mondorestore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/mondorestore/mondo-prep.c
r688 r689 203 203 iamhere("STARTING"); 204 204 log_msg(1, "OK, opened i-want-my-lvm. Shutting down LVM volumes..."); 205 if (find_home_of_exe("lvm")) // found it :) cool 205 tmp = find_home_of_exe("lvm"); 206 if (tmp) // found it :) cool 206 207 { 207 208 asprintf(&lvscan_sz, "lvm lvscan"); … … 219 220 asprintf(&vgremove_sz, "vgremove"); 220 221 } 222 paranoid_free(tmp); 223 221 224 asprintf(&command, 222 225 "for i in `%s | cut -d\"'\" -f2 | sort -r` ; do echo \"Shutting down lv $i\" >> " -
trunk/mondo/mondo/mondorestore/mondo-restore.c
r688 r689 2049 2049 asprintf(&acl_fname, ACL_BIGGLST_FNAME_RAW_SZ, ARCHIVES_PATH); 2050 2050 asprintf(&xattr_fname, XATTR_BIGGLST_FNAME_RAW_SZ, ARCHIVES_PATH); 2051 if (length_of_file(acl_fname) > 0 && find_home_of_exe("setfacl")) { 2051 tmp = find_home_of_exe("setfacl"); 2052 if (length_of_file(acl_fname) > 0 && tmp) { 2052 2053 set_acl_list(biggies_whose_EXATs_we_should_set, acl_fname); 2053 2054 } 2054 if (length_of_file(xattr_fname) > 0 2055 && find_home_of_exe("setfattr")) { 2055 paranoid_free(tmp); 2056 2057 tmp = find_home_of_exe("setfattr"); 2058 if (length_of_file(xattr_fname) > 0 && tmp) { 2056 2059 set_fattr_list(biggies_whose_EXATs_we_should_set, xattr_fname); 2057 2060 } 2061 paranoid_free(tmp); 2058 2062 paranoid_free(acl_fname); 2059 2063 paranoid_free(xattr_fname); … … 2566 2570 log_msg(1, "path is now %s", newpath); 2567 2571 log_msg(1, "restoring everything"); 2568 if (!find_home_of_exe("petris") && !g_text_mode) { 2572 tmp = find_home_of_exe("petris"); 2573 if (!tmp && !g_text_mode) { 2569 2574 newtDrawRootText(0, g_noof_rows - 2, 2570 2575 _ … … 2572 2577 newtRefresh(); 2573 2578 } 2579 paranoid_free(tmp); 2580 2574 2581 mvaddstr_and_log_it(g_currentY, 0, 2575 2582 _("Preparing to read your archives")); -
trunk/mondo/mondo/mondorestore/mondo-rstr-compare.c
r688 r689 68 68 return (1); 69 69 } 70 paranoid_free(tmp1); 71 70 72 fread((void *) &biggiestruct, 1, sizeof(biggiestruct), fin); 71 73 paranoid_fclose(fin); … … 251 253 252 254 if (compressor_exe != NULL) { 253 if (!find_home_of_exe(compressor_exe)) { 255 tmp = find_home_of_exe(compressor_exe); 256 if (!tmp) { 254 257 fatal_error("(compare_a_tarball) Compression program missing"); 255 258 } 259 paranoid_free(tmp); 256 260 if (use_star) { 257 261 if (strcmp(compressor_exe, "bzip2")) { -
trunk/mondo/mondo/mondorestore/mondo-rstr-tools.c
r688 r689 659 659 asprintf(&p1, "-o ro"); 660 660 } 661 if (find_home_of_exe("setfattr")) { 661 tmp = find_home_of_exe("setfattr"); 662 if (tmp) { 662 663 asprintf(&p2, ",user_xattr"); 663 664 } else { 664 665 asprintf(&p2, ""); 665 666 } 666 if (find_home_of_exe("setfacl")) { 667 paranoid_free(tmp); 668 669 tmp = find_home_of_exe("setfacl"); 670 if (tmp) { 667 671 asprintf(&p3, ",acl"); 668 672 } else { 669 673 asprintf(&p3, ""); 670 674 } 675 paranoid_free(tmp); 676 671 677 asprintf(&additional_parameters, "%s%s%s", p1, p2, p3); 672 678 paranoid_free(p1); … … 1374 1380 { 1375 1381 char *output = NULL; 1382 char *tmp = NULL; 1376 1383 1377 1384 /* BERLIOS: This should use $EDITOR + conf file rather first */ 1378 if (find_home_of_exe("pico")) { 1385 tmp = find_home_of_exe("pico"); 1386 if (tmp) { 1379 1387 asprintf(&output, "pico"); 1380 } else if (find_home_of_exe("nano")) { 1381 asprintf(&output, "nano"); 1382 } else if (find_home_of_exe("e3em")) { 1383 asprintf(&output, "e3em"); 1384 } else if (find_home_of_exe("e3vi")) { 1385 asprintf(&output, "e3vi"); 1386 } else { 1387 asprintf(&output, "vi"); 1388 } 1389 if (!find_home_of_exe(output)) { 1388 } else { 1389 tmp = find_home_of_exe("nano"); 1390 if (tmp) { 1391 asprintf(&output, "nano"); 1392 } else { 1393 tmp = find_home_of_exe("vi"); 1394 if (tmp) { 1395 asprintf(&output, "vi"); 1396 } else { 1397 asprintf(&output, "emacs"); 1398 } 1399 } 1400 } 1401 paranoid_free(tmp); 1402 1403 tmp = find_home_of_exe(output); 1404 if (!tmp) { 1390 1405 log_msg(2, " (find_my_editor) --- warning - %s not found", output); 1391 1406 } 1407 paranoid_free(tmp); 1392 1408 return (output); 1393 1409 }
Note:
See TracChangeset
for help on using the changeset viewer.