fix: Allow trim on encrypted disks

This commit is contained in:
Kyle Gospodnetich 2023-08-08 18:08:10 -07:00
parent cf2df01192
commit 05d7fd89cf

View File

@ -69,6 +69,10 @@ if [[ $KARGS =~ "nomodeset" ]]; then
NEEDED_KARGS="$NEEDED_KARGS --delete=\"nomodeset\"" NEEDED_KARGS="$NEEDED_KARGS --delete=\"nomodeset\""
fi fi
if [[ ! $KARGS =~ "rd.luks.options" ]]; then
NEEDED_KARGS="$NEEDED_KARGS --append=\"rd.luks.options=discard\""
fi
if [[ ! -z "$NEEDED_KARGS" ]]; then if [[ ! -z "$NEEDED_KARGS" ]]; then
echo "Found needed karg changes, applying the following: $NEEDED_KARGS" echo "Found needed karg changes, applying the following: $NEEDED_KARGS"
rpm-ostree kargs ${NEEDED_KARGS} --reboot rpm-ostree kargs ${NEEDED_KARGS} --reboot