a0b9abfb35
- Do not depend on lz4 directly, just prefer lz4 if the bin is there. - Fallback to gzip rather than bzip2 compression if lz4/xz are not available. - Remove --rsyncable argument in gzipped initramfs, WTF IS IT??? IT'S NOT IN UPSTREAM.
20 lines
340 B
Bash
20 lines
340 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"
|
|
fi
|
|
dracut -q --force $args boot/initramfs-${VERSION}.img ${VERSION}
|
|
exit $?
|