diff options
| -rwxr-xr-x | 0-preinstall.sh | 14 | ||||
| -rwxr-xr-x | 3-post-setup.sh | 3 |
2 files changed, 14 insertions, 3 deletions
diff --git a/0-preinstall.sh b/0-preinstall.sh index e0628f2..c5b5e69 100755 --- a/0-preinstall.sh +++ b/0-preinstall.sh @@ -7,7 +7,7 @@ # ██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║ # ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ #------------------------------------------------------------------------- - +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" echo "-------------------------------------------------" echo "Setting up mirrors for optimal download " echo "-------------------------------------------------" @@ -122,8 +122,18 @@ linux /vmlinuz-linux initrd /initramfs-linux.img options root=LABEL=ROOT rw rootflags=subvol=@ EOF -cp -R ~/ArchTitus /mnt/root/ +cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist echo "--------------------------------------" +echo "-- Check for low memory systems <8G --" +echo "--------------------------------------" +TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*') +if [[ $TOTALMEM -lt 8000000 ]]; then + dd if=/dev/zero of=/swapfile bs=1M count=2048 status=progress + chmod 600 /swapfile + mkswap /swapfile + swapon /swapfile +fi +echo "--------------------------------------" echo "-- SYSTEM READY FOR 0-setup --" echo "--------------------------------------" diff --git a/3-post-setup.sh b/3-post-setup.sh index 277b569..12c73f4 100755 --- a/3-post-setup.sh +++ b/3-post-setup.sh @@ -25,7 +25,7 @@ EOF # ------------------------------------------------------------------------ -echo -e "\nEnabling the cups service daemon so we can print" +echo -e "\nEnabling essential services" systemctl enable cups.service sudo ntpd -qg @@ -33,6 +33,7 @@ sudo systemctl enable ntpd.service sudo systemctl disable dhcpcd.service sudo systemctl stop dhcpcd.service sudo systemctl enable NetworkManager.service +sudo systemctl enable bluetooth echo " ############################################################################### # Cleaning |
