Changeset 2791 in MondoRescue for branches/2.2.8/mondo/src/common/libmondo-tools.c
- Timestamp:
- Apr 29, 2011, 3:37:35 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.8/mondo/src/common/libmondo-tools.c
r2059 r2791 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 */481 475 #ifdef __FreeBSD__ 482 /*483 strcpy(tmp,484 call_program_and_get_last_line_of_output485 ("vmstat | tail -1 | tr -s ' ' | cut -d' ' -f6"));486 avm += atol(tmp);487 strcpy(tmp,488 call_program_and_get_last_line_of_output489 ("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 */494 476 #else 495 /*496 strcpy(tmp,497 call_program_and_get_last_line_of_output498 ("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 */503 477 run_program_and_log_output("cat /proc/cpuinfo", 5); 504 478 run_program_and_log_output … … 506 480 5); 507 481 #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 */521 482 522 483 if (bkpinfo->use_lzo) {
Note:
See TracChangeset
for help on using the changeset viewer.