]> git.pld-linux.org Git - packages/lxc.git/blame - checkconfig-module.patch
update fedora template from fedora
[packages/lxc.git] / checkconfig-module.patch
CommitLineData
605f7b20
ER
1Upstream:
2http://sourceforge.net/p/lxc/bugs/74/
3
121019da
ER
4--- lxc-0.9.0/src/lxc/lxc-checkconfig.in~ 2013-02-18 09:47:43.000000000 +0200
5+++ lxc-0.9.0/src/lxc/lxc-checkconfig.in 2013-09-17 11:58:24.442289798 +0300
6@@ -3,6 +3,7 @@
7 # Allow environment variables to override grep and config
8 : ${CONFIG:=/proc/config.gz}
9 : ${GREP:=zgrep}
10+: ${MODNAME:=configs}
11
12 SETCOLOR_SUCCESS="printf \\033[1;32m"
13 SETCOLOR_FAILURE="printf \\033[1;31m"
14@@ -38,10 +39,19 @@
15 BOOT_CONFIG="/boot/config-$KVER"
16 [ -f "${HEADERS_CONFIG}" ] && CONFIG=${HEADERS_CONFIG}
17 [ -f "${BOOT_CONFIG}" ] && CONFIG=${BOOT_CONFIG}
18+ if [ ! -f "$CONFIG" ]; then
19+ MODULEFILE=$(modinfo -k $KVER -n $MODNAME 2> /dev/null)
20+ # don't want to modprobe, so give user a hint
21+ # altho scripts/extract-ikconfig could be used to extract contents without loading kernel module
22+ # http://svn.pld-linux.org/trac/svn/browser/geninitrd/trunk/geninitrd?rev=12696#L327
23+ fi
24 GREP=grep
25 if [ ! -f $CONFIG ]; then
26 echo "$(basename $0): unable to retrieve kernel configuration" >&2
27 echo >&2
28+ if [ -f "$MODULEFILE" ]; then
29+ echo "Try modprobe $MODNAME module, or" >&2
30+ fi
31 echo "Try recompiling with IKCONFIG_PROC, installing the kernel headers," >&2
32 echo "or specifying the kernel configuration path with:" >&2
33 echo " CONFIG=<path> $(basename $0)" >&2
This page took 0.146014 seconds and 4 git commands to generate.