summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-24 09:51:50 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-03-24 09:51:50 +0000
commit82d9ee821ed8ace6c084fdc7064effc1dd27ccb1 (patch)
tree78ec75851891a8fed3551cdb54fafed8873eea4c
parentaef02ee5b43ebaae133f5d0512e4da0575085325 (diff)
create mandb dbs during iso spin, this will significantly reduce CPU usage in live modev1.1803
-rw-r--r--src/backend/c_jail.sh1
-rw-r--r--src/backend/f_makeiso.sh9
2 files changed, 10 insertions, 0 deletions
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