#3 beautify /etc/fstab
Closed 2 years ago by leifliddy. Opened 2 years ago by leifliddy.
fedora-asahi/ leifliddy/fedora-asahi-remix-scripts main  into  main

file modified
+6 -1
@@ -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

rebased onto 84fc9e4

2 years ago

Pull-Request has been closed by leifliddy

2 years ago
Metadata