]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-checkconfig: look in one more place
authorGuido Trotter <ultrotter@google.com>
Wed, 18 Mar 2009 17:53:31 +0000 (17:53 +0000)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Thu, 19 Mar 2009 15:11:10 +0000 (16:11 +0100)
The current version of lxc-checkconfig falls back to searching in
/lib/modules/$KVER/build/.config if it doesn't find the config. In some
systems, though, the config will be installed in /boot/config-$KVER, so
we'll look there as well.

Signed-off-by: Guido Trotter <ultrotter@quaqua.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc-checkconfig.in

index b7536f20b935f35245bd58e9dfa6691d143ef742..d1385cca0c4ad6f97ffbe4a12fe1d9db30129957 100755 (executable)
@@ -25,7 +25,10 @@ is_enabled() {
 
 if [ ! -f $CONFIG ]; then
     KVER="`uname -r`"
-    CONFIG="/lib/modules/$KVER/build/.config"
+    HEADERS_CONFIG="/lib/modules/$KVER/build/.config"
+    BOOT_CONFIG="/boot/config-$KVER"
+    [ -f "${HEADERS_CONFIG}" ] && CONFIG=${HEADERS_CONFIG}
+    [ -f "${BOOT_CONFIG}" ] && CONFIG=${BOOT_CONFIG}
     GREP=grep
     if [ ! -f $CONFIG ]; then
         echo