020-lxc-checkconfig.patch 538 B

1234567891011121314151617181920
  1. --- a/src/lxc/lxc-checkconfig.in
  2. +++ b/src/lxc/lxc-checkconfig.in
  3. @@ -4,6 +4,17 @@
  4. : ${CONFIG:=/proc/config.gz}
  5. : ${GREP:=zgrep}
  6. : ${MODNAME:=configs}
  7. +: ${ZGREP:=zgrep}
  8. +: ${GUNZIP:=gunzip}
  9. +
  10. +if [ -z $(which $ZGREP) ] && ! [ -z $(which $GUNZIP) ] && [ -x $(which $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. SETCOLOR_SUCCESS="printf \\033[1;32m"
  19. SETCOLOR_FAILURE="printf \\033[1;31m"