You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
528 B

  1. --- a/src/lxc/cmd/lxc-checkconfig.in
  2. +++ b/src/lxc/cmd/lxc-checkconfig.in
  3. @@ -4,6 +4,17 @@
  4. # Allow environment variables to override config
  5. : ${CONFIG:=/proc/config.gz}
  6. : ${MODNAME:=configs}
  7. +: ${ZGREP:=zgrep}
  8. +: ${GUNZIP:=gunzip}
  9. +
  10. +if [ -z $(command -v $ZGREP) ] && ! [ -z $(command -v $GUNZIP) ] && [ -x $(command -v $GUNZIP) ] && [ -f $CONFIG ] && [ "$CONFIG" == "/proc/config.gz" ] ; then
  11. +
  12. + CONFIG_NEW="/tmp/config-$(uname -r)"
  13. + $GUNZIP -c $CONFIG > $CONFIG_NEW
  14. + CONFIG=$CONFIG_NEW
  15. +
  16. + GREP=grep
  17. +fi
  18. CAT="cat"