mkinitramfs: Nuke MIN_VERSION handling.

This needs to be expressed in terms of package dependencies,
no point in keeping that old hack. Supporting special initramfs
arch bugs in the time between 2.6.12 and 2.6.15 is not worth.

Nowadays this check succeeds anyway.

Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
This commit is contained in:
maximilian attems 2011-01-18 21:31:07 +01:00
parent 5b84e5b6ba
commit 59f9c1e2f9
3 changed files with 0 additions and 48 deletions

View File

@ -535,41 +535,3 @@ cache_run_scripts()
echo "[ -e /conf/param.conf ] && . /conf/param.conf" >> ${initdir}/ORDER
done
}
# minimal supported kernel version
check_minkver()
{
local curversion initdir DPKG_ARCH minversion cm_x tmp
curversion="${1:-}"
initdir="${2:-}"
if [ -z "${initdir}" ]; then
case ${DPKG_ARCH:-} in
ia64|hppa)
minversion="2.6.15"
;;
*)
minversion="2.6.12"
;;
esac
if dpkg --compare-versions "${curversion}" lt "${minversion}"; then
echo "W: kernel ${curversion} too old for initramfs on ${DPKG_ARCH}" >&2
echo "W: not generating requested initramfs for kernel ${curversion}" >&2
exit 2
fi
return 0
fi
set_initlist
for cm_x in ${initlist:-}; do
# sed: keep last line starting with MINKVER=,
# remove MINKVER= and trailing space
minver=$(sed '/^MINKVER=/!d;$!d;s/^MINKVER=//;s/[[:space:]]*$//' "${initdir}/${cm_x}")
if [ -z "${tmp:-}" ]; then
continue
elif dpkg --compare-versions "${curversion}" lt "${minver}"; then
echo "W: ${cm_x} hook script requires at least kernel version ${minver}" >&2
echo "W: not generating requested initramfs for kernel ${curversion}" >&2
exit 2
fi
done
}

View File

@ -105,12 +105,6 @@ else
version="${1}"
fi
# Check that we're using a new enough kernel version, first for ourselves,
# then for each of the hooks, which can have a MINKVER variable defined
check_minkver ${version}
check_minkver ${version} /usr/share/initramfs-tools/hooks
check_minkver ${version} ${CONFDIR}/hooks
case "${version}" in
/lib/modules/*/[!/]*)
;;

View File

@ -166,10 +166,6 @@ generate_initramfs()
mkinitramfs_return="$?"
remove_initramfs_bak
rm -f "${initramfs}.new"
if [ "$mkinitramfs_return" = "2" ]; then
# minversion wasn't met, exit 0
exit 0
fi
echo "update-initramfs: failed for ${initramfs} with $mkinitramfs_return." >&2
exit $mkinitramfs_return
fi