2012-05-29 14:30:26 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Kernel post-install hook for dracut.
|
|
|
|
#
|
|
|
|
# Arguments passed to this script: $1 pkgname, $2 version.
|
|
|
|
#
|
|
|
|
PKGNAME="$1"
|
|
|
|
VERSION="$2"
|
|
|
|
|
2012-11-19 22:10:33 +01:00
|
|
|
if [ ! -x usr/bin/dracut ]; then
|
2012-05-29 14:30:26 +02:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2014-10-17 15:23:09 +02:00
|
|
|
if [ -x /bin/lz4 ]; then
|
|
|
|
args="--lz4"
|
|
|
|
elif [ -x /bin/xz ]; then
|
|
|
|
args="--xz"
|
|
|
|
fi
|
|
|
|
dracut -q --force $args boot/initramfs-${VERSION}.img ${VERSION}
|
2012-05-29 14:30:26 +02:00
|
|
|
exit $?
|