Merge pull request #197 from tulilirockz/fix-boot-scripts-slowdown

fix(desktop): boot scripts slowdown
This commit is contained in:
Kyle Gospodnetich 2023-08-27 21:11:03 -07:00 committed by GitHub
commit 93c8e71668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,8 @@
#!/usr/bin/env bash
source /etc/default/bazzite
DONEFILE=/etc/bazzite/hardware_setup_done
# GLOBAL
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
KARGS=$(rpm-ostree kargs)
@ -75,9 +77,11 @@ if [[ ! $KARGS =~ "rd.luks.options" ]]; then
NEEDED_KARGS="$NEEDED_KARGS --append=rd.luks.options=discard"
fi
if [[ ! -z "$NEEDED_KARGS" ]]; then
if [[ -n "$NEEDED_KARGS" ]]; then
echo "Found needed karg changes, applying the following: $NEEDED_KARGS"
rpm-ostree kargs ${NEEDED_KARGS} --reboot
rpm-ostree kargs ${NEEDED_KARGS} --reboot || exit 1
mkdir -p "$(dirname "$DONEFILE")"
touch "$DONEFILE"
else
echo "No karg changes needed"
fi

View File

@ -7,6 +7,7 @@ Before=systemd-user-sessions.service jupiter-biosupdate.service jupiter-controll
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/bazzite-hardware-setup
ConditionPathExists=!/etc/bazzite/hardware_setup_done
[Install]
WantedBy=multi-user.target