chore: Restore BTRFS changes for all users

This commit is contained in:
Kyle Gospodnetich 2023-10-12 16:48:49 -07:00
parent d4ffe57656
commit 922efd7d8b

View File

@ -6,7 +6,7 @@ IMAGE_FLAVOR=$(jq -r '."image-flavor"' < $IMAGE_INFO)
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
# SCRIPT VERSION
HWS_VER=8
HWS_VER=9
HWS_VER_FILE="/etc/bazzite/hws_version"
HWS_VER_RAN=$(cat $HWS_VER_FILE)
@ -65,19 +65,6 @@ if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
if [[ ! $KARGS =~ "modprobe.blacklist=sp5100_tco" ]]; then
NEEDED_KARGS="$NEEDED_KARGS --append=modprobe.blacklist=sp5100_tco"
fi
# FSTAB CONFIGURATION
if [[ $(grep "compress=zstd" /etc/fstab) ]]; then
echo "Applying fstab param adjustments"
if grep -q '64GB' <<< $(lsblk -o MODEL); then
echo "64GB eMMC detected"
sed -i 's/compress=zstd:1/noatime,lazytime,discard=sync,compress-force=zstd:3,space_cache=v2/g' /etc/fstab
else
sed -i 's/compress=zstd:1/noatime,lazytime,commit=120,discard=async,compress-force=zstd:1,space_cache=v2/g' /etc/fstab
fi
else
echo "No fstab param adjustments needed"
fi
fi
if grep -qz "Kernel driver in use: radeon" <<< $GPU_ID; then
@ -177,6 +164,19 @@ if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegam
fi
fi
# FSTAB CONFIGURATION
if [[ $(grep "compress=zstd" /etc/fstab) ]]; then
echo "Applying fstab param adjustments"
if grep -q '64GB' <<< $(lsblk -o MODEL); then
echo "64GB eMMC detected"
sed -i 's/compress=zstd:1/noatime,lazytime,discard=sync,compress-force=zstd:3,space_cache=v2/g' /etc/fstab
else
sed -i 's/compress=zstd:1/noatime,lazytime,commit=120,discard=async,compress-force=zstd:1,space_cache=v2/g' /etc/fstab
fi
else
echo "No fstab param adjustments needed"
fi
# HOSTNAME FIX
# If the hostname is too long Distrobox will fail during setup
# Additonally, Anaconda likes to set the hostname to be the ipv6 address