mirror of
https://github.com/tommytran732/Arch-Setup-Script
synced 2024-11-13 21:51:33 -05:00
Update install.sh
This commit is contained in:
parent
1f359ef750
commit
79729d65ac
@ -341,16 +341,16 @@ echo "" >> /mnt/etc/bash.bashrc
|
|||||||
echo "umask 077" >> /mnt/etc/bash.bashrc
|
echo "umask 077" >> /mnt/etc/bash.bashrc
|
||||||
|
|
||||||
# Setting up ZRAM
|
# Setting up ZRAM
|
||||||
MEM=$(awk '/^Mem/ {print $2}' <(free -m))
|
MEMSIZE=$(awk '/^Mem/ {print $2}' <(free -m))
|
||||||
if [ "${MEM}" -ge "8192" ]; then
|
if [ "${MEMSIZE}" -ge "8192" ]; then
|
||||||
ZRAMSIZE=8192
|
ZRAMSIZE=8192
|
||||||
else
|
else
|
||||||
ZRAMSIZE=${MEM}
|
ZRAMSIZE=${MEMSIZE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo 'zram' > /mnt/etc/modules-load.d/zram.conf
|
echo 'zram' > /mnt/etc/modules-load.d/zram.conf
|
||||||
echo 'options zram num_devices=1' > /mnt/etc/modprobe.d/zram.conf
|
echo 'options zram num_devices=1' > /mnt/etc/modprobe.d/zram.conf
|
||||||
echo 'KERNEL=="zram0", ATTR{disksize}="${ZRAMSIZE}M" RUN="/usr/bin/mkswap /dev/zram0", TAG+="systemd"' > /mnt/etc/udev/rules.d/99-zram.rules
|
echo 'KERNEL=="zram0", ATTR{disksize}="'${ZRAMSIZE}'M" RUN="/usr/bin/mkswap /dev/zram0", TAG+="systemd"' > /mnt/etc/udev/rules.d/99-zram.rules
|
||||||
echo '# ZRAM' >> /mnt/etc/fstab
|
echo '# ZRAM' >> /mnt/etc/fstab
|
||||||
echo '/dev/zram0 none swap defaults 0 0' >> /mnt/etc/fstab
|
echo '/dev/zram0 none swap defaults 0 0' >> /mnt/etc/fstab
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user