mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-04-10 15:45:17 +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
|
#!/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
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user