mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-04-16 17:42:57 +00:00
chore: fix /etc/fstab adjustment condition (#1038)
Don't look for compress=zstd as user may want to set this. Instead, set a flag so filesystem options are set on first boot instead.
This commit is contained in:
parent
96d1d84d10
commit
dc8e861a3b
@ -142,16 +142,17 @@ if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegam
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# FSTAB CONFIGURATION
|
# FSTAB CONFIGURATION
|
||||||
if [[ $(grep "compress=zstd" /etc/fstab) ]]; then
|
if [[ ! -e /etc/ublue-os/.fstab_adjusted.flag ]]; then
|
||||||
echo "Applying fstab param adjustments"
|
echo "Applying fstab param adjustments"
|
||||||
if grep -q '64GB' <<< "$(lsblk -o MODEL)"; then
|
if grep -q '64GB' <<< "$(lsblk -o MODEL)"; then
|
||||||
echo "64GB eMMC detected"
|
echo "64GB eMMC detected"
|
||||||
sed -i 's/compress=zstd:1/noatime,lazytime,discard=sync,compress-force=zstd:3,space_cache=v2/g' /etc/fstab
|
sed -i 's/compress=zstd:1/noatime,lazytime,discard=sync,compress-force=zstd:3,space_cache=v2/g' /etc/fstab
|
||||||
else
|
else
|
||||||
sed -i 's/compress=zstd:1/noatime,lazytime,commit=120,discard=async,compress-force=zstd:1,space_cache=v2/g' /etc/fstab
|
sed -i 's/compress=zstd:1/noatime,lazytime,commit=120,discard=async,compress-force=zstd:1,space_cache=v2/g' /etc/fstab
|
||||||
fi
|
fi
|
||||||
|
touch /etc/ublue-os/.fstab_adjusted.flag
|
||||||
else
|
else
|
||||||
echo "No fstab param adjustments needed"
|
echo "No fstab param adjustments needed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ZRAM MINIMUM-FREE CONFIGURATION
|
# ZRAM MINIMUM-FREE CONFIGURATION
|
||||||
|
Loading…
x
Reference in New Issue
Block a user