Skip to content

Commit c8dc6d8

Browse files
committed
feat: remove custom rpm-ostree initramfs arg support
After longer testing, rpm-ostree initramfs is too finiky to properly support this, dracut.conf files work better without stepping on bazzites initramfs args
1 parent 64ce218 commit c8dc6d8

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

system_files/desktop/shared/usr/libexec/bazzite-hardware-setup

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ INITRAMFS_DIR="/etc/bazzite/initramfs"
2626
INITRAMFS_REBUILD_TRIGGER="$INITRAMFS_DIR/rebuild"
2727
INITRAMFS_BAZZITE_ARG_FILE="$INITRAMFS_DIR/hardware-setup.args"
2828
INITRAMFS_BAZZITE_ARGS=$(cat $INITRAMFS_BAZZITE_ARG_FILE)
29-
INITRAMFS_CUSTOM_ARGS_DIR="$INITRAMFS_DIR/args.d"
30-
INITRAMFS_CUSTOM_ARGS=""
31-
32-
# If the /etc/bazzite/initramfs/args.d dir exists
33-
if [[ -d "$INITRAMFS_CUSTOM_ARGS_DIR" ]]; then
34-
# Grab all the content of the files (minus comments) and join them together with spaces
35-
INITRAMFS_CUSTOM_ARGS=$(grep -RvP "^(#|$)" $INITRAMFS_CUSTOM_ARGS_DIR/ | sort | perl -pe 's/(^$INITRAMFS_CUSTOM_ARGS_DIR\/.+:|\\\n$)//g' | tr '\n' ' ')
36-
fi
3729

3830
# If no rebuild is requested
3931
if [[ ! -f $INITRAMFS_REBUILD_TRIGGER ]]; then
@@ -51,9 +43,9 @@ else
5143
# REMOVE REBUILD TRIGGER TO AVOID INFINITE BOOT LOOP!
5244
rm $INITRAMFS_REBUILD_TRIGGER
5345
# Rebuild current initramfs (this will add any new configs added to /etc/dracut.conf.d/) then reboot
54-
echo "Initramfs rebuild triggered, using: $INITRAMFS_BAZZITE_ARGS $INITRAMFS_CUSTOM_ARGS"
46+
echo "Initramfs rebuild triggered, adding dracut configs and these args: $INITRAMFS_BAZZITE_ARGS"
5547
plymouth display-message --text="Updating initramfs - Please wait, this may take a while" || true
56-
rpm-ostree initramfs --enable "${INITRAMFS_BAZZITE_ARGS} ${INITRAMFS_CUSTOM_ARGS}" --reboot
48+
rpm-ostree initramfs --enable ${INITRAMFS_BAZZITE_ARGS} --reboot
5749
exit 0
5850
fi
5951

@@ -98,9 +90,9 @@ if $NEEDS_INITRAMFS_APPLICATION; then
9890
echo "Found needed initramfs changes, applying the following: ${NEEDED_INITRAMFS[*]}"
9991
echo "--arg=\"-I ${NEEDED_INITRAMFS[*]}\"" > $INITRAMFS_BAZZITE_ARG_FILE
10092
INITRAMFS_BAZZITE_ARGS=$(cat $INITRAMFS_BAZZITE_ARG_FILE)
101-
echo "Building initramfs with following custom args: $INITRAMFS_CUSTOM_ARGS"
93+
echo "Building initramfs with dracut configs and the following args: ${INITRAMFS_BAZZITE_ARGS}"
10294
plymouth display-message --text="Updating initramfs - Please wait, this may take a while" || true
103-
rpm-ostree initramfs --enable "${INITRAMFS_BAZZITE_ARGS} ${INITRAMFS_CUSTOM_ARGS}"
95+
rpm-ostree initramfs --enable ${INITRAMFS_BAZZITE_ARGS}
10496
else
10597
echo "No initramfs changes needed"
10698
fi
@@ -268,4 +260,4 @@ echo $IMAGE_BRANCH > $KNOWN_IMAGE_BRANCH_FILE
268260
if [[ $IMAGE_FLAVOR =~ "nvidia" ]]; then
269261
echo "Nvidia image detected, rebooting to avoid screen freeze issue in 550."
270262
systemctl reboot
271-
fi
263+
fi

0 commit comments

Comments
 (0)