From 82d9ee821ed8ace6c084fdc7064effc1dd27ccb1 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 24 Mar 2018 09:51:50 +0000 Subject: create mandb dbs during iso spin, this will significantly reduce CPU usage in live mode --- src/backend/c_jail.sh | 1 + src/backend/f_makeiso.sh | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/backend/c_jail.sh b/src/backend/c_jail.sh index fe5e82b..acdf0db 100644 --- a/src/backend/c_jail.sh +++ b/src/backend/c_jail.sh @@ -3,6 +3,7 @@ export local jailbinmodecmd="vasile --binmode" export local jailsrcmodecmd="vasile --srcmode" export local jaildkmscmd="vasile --dkms" +export local jailmandbcmd="mandb --create" export local jailportagecmd="emerge -kav "$jailtarget"" export local jaildracutcmd="dracut -N -a dmsquash-live -a pollcdrom --force --kver="$kernver" /boot/"$jailramfsname"" export local jailmkchainloadercmd="grub2-mkimage -d /usr/lib64/grub/i386-pc -o core.img -O i386-pc biosdisk part_msdos fat -p /boot/grub" diff --git a/src/backend/f_makeiso.sh b/src/backend/f_makeiso.sh index 4635315..fb85d8a 100644 --- a/src/backend/f_makeiso.sh +++ b/src/backend/f_makeiso.sh @@ -44,6 +44,10 @@ jailisoenserv () { done } +jailisomkmandb() { + chroot "$jailsynctarget" su - "$jailuser" -c "$jailmandbcmd" +} + jailisomkdkms () { chroot "$jailsynctarget" su - "$jailuser" -c "$jaildkmscmd" } @@ -103,6 +107,11 @@ mkliveimg () { jailisostart jailisodmnt sync + # create mandb dbs (this will significantly reduce live session CPU usage) + jailisomnt + jailisomkmandb + jailisodmnt + sync # compile and install DKMS modules, if any jailisomnt jailisomkdkms -- cgit v1.2.3