• 2 Posts
  • 8 Comments
Joined 1 year ago
cake
Cake day: June 10th, 2023

help-circle

  • This is the script. /home/deck/scripts/fstab contains my customised fstab file. Yes, after an update, I just run this script once.

    #!/bin/bash
    
    if [ ! -f ~/.config/kdesurc ];then
      touch ~/.config/kdesurc
      echo "[super-user-command]" > ~/.config/kdesurc
      echo "super-user-command=sudo" >> ~/.config/kdesurc
    fi
    
    if [ ! -f /var/mnt/nas ];then
      sudo -c 'sudo mkdir "/var/mnt/nas"'
    fi
    
    sudo cp -a /home/deck/scripts/fstab /etc/fstab
    sudo steamos-readonly disable
    sudo pacman -Syy
    sudo pacman-key --init
    sudo pacman-key --populate
    sudo pacman -S --overwrite "*" nfs-utils
    sudo steamos-readonly enable
    sudo mount -a
    

  • That is correct. The best case is to write a script to make your desired changes, and then run it after each system update.
    My own use-case is that I have a NFS mount-point for my Steam Deck to use extra storage on my NAS. After the first time I figured out how to get it mounted, I made a script to disable read-only filesystem, make all the changes to the system, and then re-enable read-only filesystem. After every system update, I just run that script once.