[Lunar-commits] <moonbase> udev: Proper kernel configuration detection

Stefan Wold ratler at lunar-linux.org
Thu Mar 25 07:35:31 CET 2010


commit 3177c3a652551e46ba70cc1124d043e88119e08e
Author: Stefan Wold <ratler at lunar-linux.org>
Date:   Thu Mar 25 07:35:31 2010 +0100

    udev: Proper kernel configuration detection
---
 filesys/udev/PRE_BUILD |   26 ++++++++++----------------
 1 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/filesys/udev/PRE_BUILD b/filesys/udev/PRE_BUILD
index ea90ee1..0a85252 100644
--- a/filesys/udev/PRE_BUILD
+++ b/filesys/udev/PRE_BUILD
@@ -1,19 +1,13 @@
-
-
-udev_msg() {
-  message "${PROBLEM_COLOR}WARNING!!!${DEFAULT_COLOR} udev detected CONFIG_SYSFS_DEPRECTED=y in the kernel config."
-  message "This version of udev will not work with this option enabled, please"
-  message "recompile your kernel and disable CONFIG_SYSFS_DEPRECTED."
-}
-
-if test -e /proc/config.gz && zgrep -q 'CONFIG_SYSFS_DEPRECATED=y' /proc/config.gz; then
-  udev_msg
-  exit 1
-elif test -e /usr/src/linux/.config && grep -q 'CONFIG_SYSFS_DEPRECATED=y' /usr/src/linux/.config; then
-  udev_msg
-  exit 1
-elif test -e /etc/lunar/local/.config.2.6.stable && grep -q 'CONFIG_SYSFS_DEPRECATED=y' /etc/lunar/local/.config.2.6.stable; then
-  udev_msg
+if kernel_option_present CONFIG_SYSFS_DEPRECATED || \
+   ! kernel_option_present CONFIG_INOTIFY || \
+   ! kernel_option_present CONFIG_INOTIFY_USER; then
+  message "${PROBLEM_COLOR}PROBLEM: ${MODULE_COLOR}udev${DEFAULT_COLOR} detected incompatible kernel options."
+  message "Please verify that CONFIG_SYSFS_DEPRECATED is disabled,"
+  message "and that CONFIG_INOTIFY and CONFIG_INOTIFY_USER"
+  message "are enabled."
+  message ""
+  message "Then recompile your kernel and try 'lin udev' again."
+  message ""
   exit 1
 fi
 


More information about the Lunar-commits mailing list