Changeset 2833 in MondoRescue for branches/2.2.8/mondo/src/common/libmondo-tools.c
- Timestamp:
- Jun 19, 2011, 2:13:48 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.8/mondo/src/common/libmondo-tools.c
r2791 r2833 473 473 run_program_and_log_output("cat /etc/*-release", 5); 474 474 run_program_and_log_output("cat /etc/*issue*", 5); 475 /* 476 sprintf(g_tmpfs_mountpt, "%s/tmpfs", bkpinfo->tmpdir); 477 sprintf(command, "mkdir -p %s", g_tmpfs_mountpt); 478 paranoid_system(command); 479 rdsiz_MB = PPCFG_RAMDISK_SIZE + g_tape_buffer_size_MB; 480 */ 475 481 #ifdef __FreeBSD__ 482 /* 483 strcpy(tmp, 484 call_program_and_get_last_line_of_output 485 ("vmstat | tail -1 | tr -s ' ' | cut -d' ' -f6")); 486 avm += atol(tmp); 487 strcpy(tmp, 488 call_program_and_get_last_line_of_output 489 ("swapinfo | grep -v Device | tr -s ' ' | cut -d' ' -f4 | tr '\n' '+' | sed 's/+$//' | bc")); 490 avm += atol(tmp); 491 sprintf(command, "mdmfs -s %d%c md9 %s", rdsiz_MB, 'm', 492 g_tmpfs_mountpt); 493 */ 476 494 #else 495 /* 496 strcpy(tmp, 497 call_program_and_get_last_line_of_output 498 ("free | grep ':' | tr -s ' ' '\t' | cut -f2 | head -n1")); 499 avm += atol(tmp); 500 sprintf(command, "mount /dev/shm -t tmpfs %s -o size=%d%c", 501 g_tmpfs_mountpt, rdsiz_MB, 'm'); 502 */ 477 503 run_program_and_log_output("cat /proc/cpuinfo", 5); 478 504 run_program_and_log_output … … 480 506 5); 481 507 #endif 508 /* 509 if (avm / 1024 > rdsiz_MB * 3) { 510 if (run_program_and_log_output(command, 5)) { 511 g_tmpfs_mountpt[0] = '\0'; 512 log_it("Failed to mount tmpfs"); 513 } else { 514 log_it("Tmpfs mounted OK - %d MB", rdsiz_MB); 515 } 516 } else { 517 g_tmpfs_mountpt[0] = '\0'; 518 log_it("It doesn't seem you have enough swap to use tmpfs. Fine."); 519 } 520 */ 482 521 483 522 if (bkpinfo->use_lzo) {
Note:
See TracChangeset
for help on using the changeset viewer.