summarylogtreecommitdiffstats
path: root/dracut-install
blob: ce616cde16ef4869e3b37d07bc2c101eb6a3a896 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash

ESP_DIR="$(bootctl --print-esp-path)"
while read -r line; do
	if [[ "$line" == 'usr/lib/modules/'+([^/])'/pkgbase' ]]; then
		read -r pkgbase < "/${line}"
		kver="${line#'usr/lib/modules/'}"
		kver="${kver%'/pkgbase'}"

		dracut --force --hostonly --uefi "${ESP_DIR}/EFI/${pkgbase}/${pkgbase}-${kver}.efi" --kver "$kver"
		#dracut "${args[@]}" --no-hostonly "/boot/initramfs-${pkgbase}-fallback.img" --kver "$kver"
	fi
done