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

View File

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