mirror of
https://github.com/rwinkhart/artix-install-script.git
synced 2026-09-05 08:27:16 -04:00
Attempted to fix swap configuration
This commit is contained in:
@@ -13,6 +13,7 @@ username="$(< /tempfiles/username)"
|
|||||||
userpassword="$(< /tempfiles/userpassword)"
|
userpassword="$(< /tempfiles/userpassword)"
|
||||||
rootpassword="$(< /tempfiles/rootpassword)"
|
rootpassword="$(< /tempfiles/rootpassword)"
|
||||||
timezone="$(< /tempfiles/timezone)"
|
timezone="$(< /tempfiles/timezone)"
|
||||||
|
swap="$(< /tempfiles/swap)"
|
||||||
|
|
||||||
# configuring locale and clock Settings
|
# configuring locale and clock Settings
|
||||||
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
|
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
|
||||||
@@ -188,6 +189,11 @@ touch /home/"$username"/.ssh/authorized_keys
|
|||||||
chown -R "$username" /home/"$username"/.ssh
|
chown -R "$username" /home/"$username"/.ssh
|
||||||
|
|
||||||
# misc configuration
|
# misc configuration
|
||||||
|
if [ "$swap" -gt 0 ]; then
|
||||||
|
echo 'vm.swappiness=10' > /etc/sysctl.d/99-swappiness.conf
|
||||||
|
else
|
||||||
|
echo 'vm.swappiness=0' > /etc/sysctl.d/99-swappiness.conf
|
||||||
|
fi
|
||||||
echo -e ""$username" soft memlock 64\n"$username" hard memlock 2097152\n"$username" hard nofile 524288\n# End of file" > /etc/security/limits.conf # increase memlock and add support for esync
|
echo -e ""$username" soft memlock 64\n"$username" hard memlock 2097152\n"$username" hard nofile 524288\n# End of file" > /etc/security/limits.conf # increase memlock and add support for esync
|
||||||
mkdir -p /home/"$username"/.gnupg
|
mkdir -p /home/"$username"/.gnupg
|
||||||
echo 'pinentry-program /usr/bin/pinentry-tty' > /home/"$username"/.gnupg/gpg-agent.conf # forces gpg prompts to use terminal input
|
echo 'pinentry-program /usr/bin/pinentry-tty' > /home/"$username"/.gnupg/gpg-agent.conf # forces gpg prompts to use terminal input
|
||||||
|
|||||||
+2
-4
@@ -147,14 +147,11 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# create and mount swap file
|
# create and mount swap file
|
||||||
if [ "$swap" != 0 ]; then
|
if [ "$swap" -gt 0 ]; then
|
||||||
dd if=/dev/zero of=/mnt/swapfile bs=1G count="$swap" status=progress
|
dd if=/dev/zero of=/mnt/swapfile bs=1G count="$swap" status=progress
|
||||||
chmod 600 /mnt/swapfile
|
chmod 600 /mnt/swapfile
|
||||||
mkswap /mnt/swapfile
|
mkswap /mnt/swapfile
|
||||||
swapon /mnt/swapfile
|
swapon /mnt/swapfile
|
||||||
echo 'vm.swappiness=10' > /mnt/etc/sysctl.d/99-swappiness.conf
|
|
||||||
else
|
|
||||||
echo 'vm.swappiness=0' > /mnt/etc/sysctl.d/99-swappiness.conf
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fstabgen -U /mnt >> /mnt/etc/fstab
|
fstabgen -U /mnt >> /mnt/etc/fstab
|
||||||
@@ -183,6 +180,7 @@ echo "$username" > /mnt/tempfiles/username
|
|||||||
echo "$userpassword" > /mnt/tempfiles/userpassword
|
echo "$userpassword" > /mnt/tempfiles/userpassword
|
||||||
echo "$rootpassword" > /mnt/tempfiles/rootpassword
|
echo "$rootpassword" > /mnt/tempfiles/rootpassword
|
||||||
echo "$timezone" > /mnt/tempfiles/timezone
|
echo "$timezone" > /mnt/tempfiles/timezone
|
||||||
|
echo "$swap" > /mnt/tempfiles/swap
|
||||||
|
|
||||||
# download and initiate part 2
|
# download and initiate part 2
|
||||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/chrootInstall.sh -o /mnt/chrootInstall.sh
|
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/chrootInstall.sh -o /mnt/chrootInstall.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user