mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-03-27 23:37:53 +00:00
Merge pull request #197 from tulilirockz/fix-boot-scripts-slowdown
fix(desktop): boot scripts slowdown
This commit is contained in:
commit
93c8e71668
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user