Abort udev upgrade if devtmpfs support is missing

Add preinst check to abort udev upgrade if the currently running kernel
lacks devtmpfs support. Since udev 176, devtmpfs is mandatory as udev no
longer creates any device nodes itself. This only affects self-compiled
kernels which now need CONFIG_DEVTMPFS=y.  Closes: #722580
This commit is contained in:
Michael Biebl 2013-09-17 22:01:54 +02:00
parent 799b47d26f
commit 348ba69de1

17
debian/udev.preinst vendored
View File

@ -117,6 +117,12 @@ check_kernel_features() {
fi
local missing_devtmpfs=0
if ! grep -q '[[:space:]]devtmpfs$' /proc/filesystems; then
missing_devtmpfs=1
abort_install=1
fi
local sysfs_deprecated=0
if [ -d /sys/class/mem/null -a ! -L /sys/class/mem/null ]; then
sysfs_deprecated=1
@ -135,6 +141,15 @@ the running kernel:
END
fi
if [ "$missing_devtmpfs" -eq 1 ]; then
cat <<END
Since release 176, udev requires support for the following features in
the running kernel:
- devtmpfs (CONFIG_DEVTMPFS)
END
fi
if [ "$sysfs_deprecated" -eq 1 ]; then
db_input critical udev/sysfs_deprecated_incompatibility || true
fi
@ -203,7 +218,7 @@ check_version() {
# $2 is non-empty when installing from the "config-files" state
[ "$2" ] || return 0
if dpkg --compare-versions $2 lt 168-2; then
if dpkg --compare-versions $2 lt 204-4; then
# these must be checked first to allow aborting before changing anything
if chrooted; then
echo 'Running in a chroot, skipping the kernel versions checks!'