void-packages/srcpkgs/dracut/files/kernel-hook-postinst
2014-10-17 15:23:30 +02:00

22 lines
385 B
Bash

#!/bin/sh
#
# Kernel post-install hook for dracut.
#
# Arguments passed to this script: $1 pkgname, $2 version.
#
PKGNAME="$1"
VERSION="$2"
if [ ! -x usr/bin/dracut ]; then
exit 0
fi
if [ -x /bin/lz4 ]; then
args="--lz4"
elif [ -x /bin/xz ]; then
args="--xz"
elif [ -x /bin/bzip2 ]; then
args="--bzip2"
fi
dracut -q --force $args boot/initramfs-${VERSION}.img ${VERSION}
exit $?