From 0e0fa9c87cd9b47438970b87f7fcec2fc873e3b2 Mon Sep 17 00:00:00 2001 From: verita84 Date: Wed, 15 Nov 2023 00:27:07 +0000 Subject: [PATCH] Update gentoo.sh --- gentoo.sh | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/gentoo.sh b/gentoo.sh index 53b6b4d..8896ad8 100644 --- a/gentoo.sh +++ b/gentoo.sh @@ -168,15 +168,11 @@ unmaskPackages() { finishInstall() { unmaskPackages + distccConfigure chroot $TARGET /usr/bin/bash /tmp/packages.sh } -buildGentoo() { - - if [ ! -d "$TARGET/var/db/repos/gentoo/x11-misc" ]; then - chroot $TARGET /usr/bin/emerge --sync - fi - +distccConfigure() { if [ -z "$DISTCC_LISTEN" ]; then echo echo @@ -188,13 +184,31 @@ buildGentoo() { echo "[Building DistCC]" echo echo - chroot $TARGET /usr/bin/emerge sys-devel/distcc + if [ -f "$TARGET/usr/bin/distccd" ]; then + echo "Distcc already installed" + else + chroot $TARGET /usr/bin/emerge sys-devel/distcc + fi echo "" >$TARGET/etc/distcc/hosts for i in "${DISTCC_HOSTS[@]}"; do echo $i >>$TARGET/etc/distcc/hosts done + echo "[Killing Distccd]" + /usr/sbin/killall -9 distccd + echo + echo "[Starting Distccd]" + echo chroot $TARGET /usr/bin/distccd --no-detach --daemon --port 3632 -N 15 --allow $DISTCC_LISTEN & fi +} + +buildGentoo() { + + if [ ! -d "$TARGET/var/db/repos/gentoo/x11-misc" ]; then + chroot $TARGET /usr/bin/emerge --sync + fi + + distccConfigure echo echo @@ -222,7 +236,6 @@ buildGentoo() { echo "[Installing Kernel]" echo echo - #chroot $TARGET /usr/bin/emerge =sys-kernel/$(ls $TARGET/var/db/repos/gentoo/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.* | cut -d '/' -f9 | sed 's/.ebuild//' | head -1) sys-kernel/linux-firmware chroot $TARGET /usr/bin/emerge gentoo-kernel-bin sys-kernel/linux-firmware echo @@ -480,7 +493,7 @@ menu() { echo "[9] Initialize Disk" echo read -p 'Your Choice: ' choice - + if [[ $choice = 1 ]]; then set-devices partitions @@ -651,8 +664,8 @@ set-devices() { read -p 'BTRFS Root Volume name: ' -e -i "gentoo" root_name HARD_DISK=$device ROOT_NAME=$root_name - echo $HARD_DISK > /tmp/disk - echo $ROOT_NAME >> /tmp/disk + echo $HARD_DISK >/tmp/disk + echo $ROOT_NAME >>/tmp/disk fi partitionDetection }