mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-02-11 15:40:14 +00:00
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
This commit is contained in:
parent
64ce218b37
commit
c8dc6d8f32
@ -26,14 +26,6 @@ INITRAMFS_DIR="/etc/bazzite/initramfs"
|
||||
INITRAMFS_REBUILD_TRIGGER="$INITRAMFS_DIR/rebuild"
|
||||
INITRAMFS_BAZZITE_ARG_FILE="$INITRAMFS_DIR/hardware-setup.args"
|
||||
INITRAMFS_BAZZITE_ARGS=$(cat $INITRAMFS_BAZZITE_ARG_FILE)
|
||||
INITRAMFS_CUSTOM_ARGS_DIR="$INITRAMFS_DIR/args.d"
|
||||
INITRAMFS_CUSTOM_ARGS=""
|
||||
|
||||
# If the /etc/bazzite/initramfs/args.d dir exists
|
||||
if [[ -d "$INITRAMFS_CUSTOM_ARGS_DIR" ]]; then
|
||||
# Grab all the content of the files (minus comments) and join them together with spaces
|
||||
INITRAMFS_CUSTOM_ARGS=$(grep -RvP "^(#|$)" $INITRAMFS_CUSTOM_ARGS_DIR/ | sort | perl -pe 's/(^$INITRAMFS_CUSTOM_ARGS_DIR\/.+:|\\\n$)//g' | tr '\n' ' ')
|
||||
fi
|
||||
|
||||
# If no rebuild is requested
|
||||
if [[ ! -f $INITRAMFS_REBUILD_TRIGGER ]]; then
|
||||
@ -51,9 +43,9 @@ else
|
||||
# REMOVE REBUILD TRIGGER TO AVOID INFINITE BOOT LOOP!
|
||||
rm $INITRAMFS_REBUILD_TRIGGER
|
||||
# Rebuild current initramfs (this will add any new configs added to /etc/dracut.conf.d/) then reboot
|
||||
echo "Initramfs rebuild triggered, using: $INITRAMFS_BAZZITE_ARGS $INITRAMFS_CUSTOM_ARGS"
|
||||
echo "Initramfs rebuild triggered, adding dracut configs and these args: $INITRAMFS_BAZZITE_ARGS"
|
||||
plymouth display-message --text="Updating initramfs - Please wait, this may take a while" || true
|
||||
rpm-ostree initramfs --enable "${INITRAMFS_BAZZITE_ARGS} ${INITRAMFS_CUSTOM_ARGS}" --reboot
|
||||
rpm-ostree initramfs --enable ${INITRAMFS_BAZZITE_ARGS} --reboot
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@ -98,9 +90,9 @@ if $NEEDS_INITRAMFS_APPLICATION; then
|
||||
echo "Found needed initramfs changes, applying the following: ${NEEDED_INITRAMFS[*]}"
|
||||
echo "--arg=\"-I ${NEEDED_INITRAMFS[*]}\"" > $INITRAMFS_BAZZITE_ARG_FILE
|
||||
INITRAMFS_BAZZITE_ARGS=$(cat $INITRAMFS_BAZZITE_ARG_FILE)
|
||||
echo "Building initramfs with following custom args: $INITRAMFS_CUSTOM_ARGS"
|
||||
echo "Building initramfs with dracut configs and the following args: ${INITRAMFS_BAZZITE_ARGS}"
|
||||
plymouth display-message --text="Updating initramfs - Please wait, this may take a while" || true
|
||||
rpm-ostree initramfs --enable "${INITRAMFS_BAZZITE_ARGS} ${INITRAMFS_CUSTOM_ARGS}"
|
||||
rpm-ostree initramfs --enable ${INITRAMFS_BAZZITE_ARGS}
|
||||
else
|
||||
echo "No initramfs changes needed"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user