[lxc-devel] [PATCH] lxc-checkconfig: look in one more place
Guido Trotter
ultrotter at google.com
Wed Mar 18 17:53:31 UTC 2009
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 at quaqua.net>
---
src/lxc/lxc-checkconfig.in | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/lxc/lxc-checkconfig.in b/src/lxc/lxc-checkconfig.in
index b7536f2..d1385cc 100755
--- a/src/lxc/lxc-checkconfig.in
+++ b/src/lxc/lxc-checkconfig.in
@@ -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
--
1.5.6.5
More information about the lxc-devel
mailing list