Add BPM hook and script for generating initramfs files automatically
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
name: dracut
|
||||
description: Event driven initramfs infrastructure
|
||||
version: 106
|
||||
revision: 2
|
||||
url: https://github.com/dracut-ng/dracut-ng
|
||||
license: GPL2-or-later
|
||||
architecture: any
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
trigger_operations: ["install", "upgrade", "remove"]
|
||||
target_type: "path"
|
||||
targets: ["boot/vmlinu*"]
|
||||
depends: ["dracut"]
|
||||
run: "/usr/bin/generate-initramfs"
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
for kernel in /usr/lib/modules/*; do
|
||||
kernel=$(basename "$kernel")
|
||||
dracut -f --kver "$kver"
|
||||
done
|
||||
@@ -24,6 +24,12 @@ build() {
|
||||
package() {
|
||||
make DESTDIR="$BPM_OUTPUT" install
|
||||
|
||||
# Install generate-initramfs script
|
||||
install -Dm755 "$BPM_WORKDIR"/generate-initramfs "$BPM_OUTPUT"/usr/bin/generate-initramfs
|
||||
|
||||
# Install BPM hook
|
||||
install -Dm644 "$BPM_WORKDIR"/10-dracut.bpmhook "$BPM_OUTPUT"/var/lib/bpm/hooks/10-dracut.bpmhook
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/dracut/COPYING
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user