blob: 682cf9ac84aafd5c427f286fa68d1e92ab913d34 [file] [log] [blame]
--- a/src/lxc/cmd/lxc-checkconfig.in
+++ b/src/lxc/cmd/lxc-checkconfig.in
@@ -4,6 +4,17 @@
# Allow environment variables to override config
: ${CONFIG:=/proc/config.gz}
: ${MODNAME:=configs}
+: ${ZGREP:=zgrep}
+: ${GUNZIP:=gunzip}
+
+if [ -z $(command -v $ZGREP) ] && ! [ -z $(command -v $GUNZIP) ] && [ -x $(command -v $GUNZIP) ] && [ -f $CONFIG ] && [ "$CONFIG" == "/proc/config.gz" ] ; then
+
+ CONFIG_NEW="/tmp/config-$(uname -r)"
+ $GUNZIP -c $CONFIG > $CONFIG_NEW
+ CONFIG=$CONFIG_NEW
+
+ GREP=grep
+fi
CAT="cat"