[package] lxc: add new package

git-svn-id: svn://svn.openwrt.org/openwrt/packages@36651 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
luka
2013-05-17 11:32:24 +00:00
parent 33d994c54a
commit eb559e89c8
4 changed files with 269 additions and 0 deletions

View File

@ -0,0 +1,32 @@
--- a/configure.ac
+++ b/configure.ac
@@ -11,29 +11,6 @@
AM_PROG_CC_C_O
AC_GNU_SOURCE
-# Detect the distribution. This is used for the default configuration and
-# for some distro-specific build options.
-AC_MSG_CHECKING([host distribution])
-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, oracle, fedora, suse, gentoo, debian, arch, slackware, paldo, mandriva or pardus.]))
-if test "z$with_distro" = "z"; then
- with_distro=`lsb_release -is`
-fi
-if test "z$with_distro" = "z"; then
- AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
- AC_CHECK_FILE(/etc/oracle-release,with_distro="oracle")
- AC_CHECK_FILE(/etc/fedora-release,with_distro="fedora")
- AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
- AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
- AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
- AC_CHECK_FILE(/etc/arch-release,with_distro="arch")
- AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
- AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware")
- AC_CHECK_FILE(/etc/mandrakelinux-release, with_distro="mandriva")
- AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva")
- AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus")
-fi
-with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]'`
-
if test "z$with_distro" = "z"; then
with_distro="unknown"
fi

View File

@ -0,0 +1,20 @@
--- a/src/lxc/lxc-checkconfig.in
+++ b/src/lxc/lxc-checkconfig.in
@@ -3,6 +3,17 @@
# Allow environment variables to override grep and config
: ${CONFIG:=/proc/config.gz}
: ${GREP:=zgrep}
+: ${ZGREP:=zgrep}
+: ${GUNZIP:=gunzip}
+
+if [ -z $(which $ZGREP) ] && ! [ -z $(which $GUNZIP) ] && [ -x $(which $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
SETCOLOR_SUCCESS="printf \\033[1;32m"
SETCOLOR_FAILURE="printf \\033[1;31m"

View File

@ -0,0 +1,11 @@
--- a/src/lxc/lxc-ps.in
+++ b/src/lxc/lxc-ps.in
@@ -91,7 +91,7 @@
done
if [ "$list_container_processes" -eq "1" ]; then
- set -- -e $@
+ set -- $@
fi
get_parent_cgroup