void-packages/srcpkgs/mkinitcpio/files/kernel-hook-postinst
Andrew J. Hesford 7998ae32c1 mkinitcpio: update to 30, add mkinitcpio-zfs subpackage
ZFS hooks taken from [1] and slightly modified:

1. If present, /etc/hostid is included in the image
2. Pool imports are read/write by default
3. Dracut-style root=zfs:<filesystem> arguments are recognized

[1] https://github.com/archzfs/archzfs/tree/master/src/zfs-utils
2021-05-17 18:02:45 +02:00

16 lines
279 B
Bash

#!/bin/sh
#
# Kernel post-install hook for mkinitcpio.
#
# Arguments passed to this script: $1 pkgname, $2 version.
#
PKGNAME="$1"
VERSION="$2"
if [ ! -x usr/bin/mkinitcpio ]; then
exit 0
fi
umask 0077
usr/bin/mkinitcpio -g boot/initramfs-${VERSION}.img -k ${VERSION}
exit $?