]> git.pld-linux.org Git - packages/lxc.git/commitdiff
give hint to user to modprobe configs (altho could just modprobe it?)
authorElan Ruusamäe <glen@delfi.ee>
Tue, 17 Sep 2013 09:00:06 +0000 (12:00 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 17 Sep 2013 09:00:06 +0000 (12:00 +0300)
checkconfig-module.patch [new file with mode: 0644]
lxc.spec

diff --git a/checkconfig-module.patch b/checkconfig-module.patch
new file mode 100644 (file)
index 0000000..94fa138
--- /dev/null
@@ -0,0 +1,30 @@
+--- lxc-0.9.0/src/lxc/lxc-checkconfig.in~      2013-02-18 09:47:43.000000000 +0200
++++ lxc-0.9.0/src/lxc/lxc-checkconfig.in       2013-09-17 11:58:24.442289798 +0300
+@@ -3,6 +3,7 @@
+ # Allow environment variables to override grep and config
+ : ${CONFIG:=/proc/config.gz}
+ : ${GREP:=zgrep}
++: ${MODNAME:=configs}
+ SETCOLOR_SUCCESS="printf \\033[1;32m"
+ SETCOLOR_FAILURE="printf \\033[1;31m"
+@@ -38,10 +39,19 @@
+     BOOT_CONFIG="/boot/config-$KVER"
+     [ -f "${HEADERS_CONFIG}" ] && CONFIG=${HEADERS_CONFIG}
+     [ -f "${BOOT_CONFIG}" ] && CONFIG=${BOOT_CONFIG}
++    if [ ! -f "$CONFIG" ]; then
++        MODULEFILE=$(modinfo -k $KVER -n $MODNAME 2> /dev/null)
++        # don't want to modprobe, so give user a hint
++        # altho scripts/extract-ikconfig could be used to extract contents without loading kernel module
++        # http://svn.pld-linux.org/trac/svn/browser/geninitrd/trunk/geninitrd?rev=12696#L327
++    fi
+     GREP=grep
+     if [ ! -f $CONFIG ]; then
+         echo "$(basename $0): unable to retrieve kernel configuration" >&2
+         echo >&2
++        if [ -f "$MODULEFILE" ]; then
++            echo "Try modprobe $MODNAME module, or" >&2
++        fi
+         echo "Try recompiling with IKCONFIG_PROC, installing the kernel headers," >&2
+         echo "or specifying the kernel configuration path with:" >&2
+         echo "  CONFIG=<path> $(basename $0)" >&2
index d880114a3ebdf16973d24ad6badbb9f0bf7889e3..f2c71315ab711e4129daa778ab2ba03c02b61604 100644 (file)
--- a/lxc.spec
+++ b/lxc.spec
@@ -16,6 +16,7 @@ Source0:      http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz
 Patch0:                %{name}-devpts.patch
 Patch1:                %{name}-pld.patch
 Patch2:                am-1.14.patch
+Patch3:                checkconfig-module.patch
 URL:           http://lxc.sourceforge.net/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
@@ -98,6 +99,7 @@ Wiązanie Pythona (3.x) do LXC.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %{__aclocal} -I config
This page took 0.035876 seconds and 4 git commands to generate.