@@ -26,14 +26,6 @@ INITRAMFS_DIR="/etc/bazzite/initramfs"
2626INITRAMFS_REBUILD_TRIGGER=" $INITRAMFS_DIR /rebuild"
2727INITRAMFS_BAZZITE_ARG_FILE=" $INITRAMFS_DIR /hardware-setup.args"
2828INITRAMFS_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
3931if [[ ! -f $INITRAMFS_REBUILD_TRIGGER ]]; then
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
5850fi
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}
10496else
10597 echo " No initramfs changes needed"
10698fi
@@ -268,4 +260,4 @@ echo $IMAGE_BRANCH > $KNOWN_IMAGE_BRANCH_FILE
268260if [[ $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