Frederik Schwan pushed to branch main at Arch Linux / Packaging / Packages / 
dracut


Commits:
584af88d by Laszlo Gombos at 2025-11-12T09:03:31+01:00
remove hardcoded use of --hostonly from the pacman hook

Provide an enviroment variable to disable the hook.

- - - - -


2 changed files:

- dracut-install.script
- dracut-remove.script


Changes:

=====================================
dracut-install.script
=====================================
@@ -1,6 +1,11 @@
 #!/usr/bin/env bash
 
-args=('--force' '--no-hostonly-cmdline' '-L 3')
+# If KERNEL_INSTALL_INITRD_GENERATOR is set, disable this hook
+if [ -n "$KERNEL_INSTALL_INITRD_GENERATOR" ]; then
+    exit 0
+fi
+
+args=('--force' '-L 3')
 
 while read -r line; do
        if [[ "$line" == 'usr/lib/modules/'+([^/])'/pkgbase' ]]; then
@@ -10,6 +15,6 @@ while read -r line; do
 
                echo "--> Building initramfs for ${pkgbase} (${kver})"
                install -Dm0644 "/${line%'/pkgbase'}/vmlinuz" 
"/boot/vmlinuz-${pkgbase}"
-               dracut "${args[@]}" --hostonly "/boot/initramfs-${pkgbase}.img" 
--kver "$kver"
+               dracut "${args[@]}" "/boot/initramfs-${pkgbase}.img" --kver 
"$kver"
        fi
 done


=====================================
dracut-remove.script
=====================================
@@ -1,5 +1,10 @@
 #!/usr/bin/env bash
 
+# If KERNEL_INSTALL_INITRD_GENERATOR is set, disable this hook
+if [ -n "$KERNEL_INSTALL_INITRD_GENERATOR" ]; then
+    exit 0
+fi
+
 while read -r line; do
        if [[ "$line" == 'usr/lib/modules/'+([^/])'/pkgbase' ]]; then
                read -r pkgbase < "/${line}"



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/dracut/-/commit/584af88d5947e06bf26883f5515362556b54f918

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/dracut/-/commit/584af88d5947e06bf26883f5515362556b54f918
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to