From: Christian Hofstaedtler Date: Mon, 9 May 2011 19:06:52 +0000 (+0200) Subject: work around udev's "cosmetic warnings" X-Git-Tag: v0.14.0~12 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=14b6242e7b3acfd69e5460dd2233a4cb8cfc183b work around udev's "cosmetic warnings" Debian Bug #624145. All of this should be harmless, and we're taking extra caution by only targeting the one known problematic udev version. --- diff --git a/etc/grml/fai/config/files/etc/initramfs-tools/hooks/000-udev-shutup/GRMLBASE b/etc/grml/fai/config/files/etc/initramfs-tools/hooks/000-udev-shutup/GRMLBASE new file mode 100755 index 0000000..f125511 --- /dev/null +++ b/etc/grml/fai/config/files/etc/initramfs-tools/hooks/000-udev-shutup/GRMLBASE @@ -0,0 +1,46 @@ +#!/bin/sh + +# This file is installed by grml-live in 10-build-initramfs. +# It's purpose is to shut up so called "cosmetic warnings" +# introduced in udev 168-1. + +PREREQ="" +prereqs() +{ + echo "$PREREQ" +} +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +# Restrict this to the known problematic version. +UDEV_VERSION=$(dpkg-query -W -f '${Version}' udev) +if [ "$UDEV_VERSION" != "168-1" ]; then + exit 0 +fi + +. /usr/share/initramfs-tools/hook-functions + +TMPFILE=$(mktemp) + +cat >$TMPFILE </dev/null| sort -r | head -1) KERNELVERSION=$(echo "${FILE##$target/boot/vmlinuz-}")