| |
@@ -24,7 +24,12 @@
|
| |
|
| |
mkswap /var/swap/swapfile
|
| |
swapon /var/swap/swapfile
|
| |
- grep -q /var/swap/swapfile /etc/fstab || echo '/var/swap/swapfile swap swap sw 0 0' >> /etc/fstab
|
| |
+
|
| |
+ if [[ ! $(grep /var/swap/swapfile /etc/fstab) ]]; then
|
| |
+ echo '/var/swap/swapfile swap swap sw 0 0' >> /etc/fstab
|
| |
+ fstab_col=$(column -t /etc/fstab)
|
| |
+ echo "$fstab_col" > /etc/fstab
|
| |
+ fi
|
| |
|
| |
# If we got this far, disable it for good measure (even though it should not run again)
|
| |
systemctl disable asahi-setup-swap-firstboot.service
|
| |
Make /etc/fstab more readable by aligning the columns