Skip to content

Commit

Permalink
Merge pull request #197 from tulilirockz/fix-boot-scripts-slowdown
Browse files Browse the repository at this point in the history
fix(desktop): boot scripts slowdown
  • Loading branch information
KyleGospo authored Aug 28, 2023
2 parents 3433a25 + 9452a41 commit 93c8e71
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions system_files/desktop/shared/usr/bin/bazzite-hardware-setup
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 93c8e71

Please sign in to comment.