fix(deck): Scale back fstab changes on Decks with eMMC.

This commit is contained in:
Kyle Gospodnetich 2023-08-11 14:41:20 -07:00
parent b57d461c15
commit cee0999eca

View File

@ -10,10 +10,12 @@ echo "Current kargs: $KARGS"
# FSTAB CONFIGURATION
if [[ $(grep "compress=zstd" /etc/fstab) ]]; then
echo "Applying fstab param adjustments"
sed -i 's/compress=zstd:1/noatime,lazytime,commit=120,compress-force=zstd:1,space_cache=v2,discard=async/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
if grep -q '64GB' <<< $(lsblk -o MODEL); then
echo "Increasing compression for detected 64GB eMMC"
sed -i 's/compress-force=zstd:1/compress-force=zstd:3/g' /etc/fstab
echo "Disabling commit and async discard changes for detected 64GB eMMC"
sed -i 's/commit=120,discard=async//g' /etc/fstab
fi
else
echo "No fstab param adjustments needed"