diff options
-rw-r--r-- | recipes-containers/lxc/files/lxc-0.9.0-use-susv3-head-arguments.patch | 46 | ||||
-rw-r--r-- | recipes-containers/lxc/lxc_0.9.0.bb | 1 |
2 files changed, 47 insertions, 0 deletions
diff --git a/recipes-containers/lxc/files/lxc-0.9.0-use-susv3-head-arguments.patch b/recipes-containers/lxc/files/lxc-0.9.0-use-susv3-head-arguments.patch new file mode 100644 index 00000000..86ed7d25 --- /dev/null +++ b/recipes-containers/lxc/files/lxc-0.9.0-use-susv3-head-arguments.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | Upstream-status: Pending | ||
2 | |||
3 | --- lxc-0.9.0.orig/src/lxc/lxc-checkconfig.in | ||
4 | +++ lxc-0.9.0/src/lxc/lxc-checkconfig.in | ||
5 | @@ -67,7 +67,7 @@ print_cgroups() { | ||
6 | awk '$1 !~ /#/ && $3 == mp { print $2; } ; END { exit(0); } ' "mp=$1" "$2" ; | ||
7 | } | ||
8 | |||
9 | -CGROUP_MNT_PATH=`print_cgroups cgroup /proc/self/mounts | head -1` | ||
10 | +CGROUP_MNT_PATH=`print_cgroups cgroup /proc/self/mounts | head -n 1` | ||
11 | KVER_MAJOR=$($GREP '^# Linux' $CONFIG | \ | ||
12 | sed -r 's/.* ([0-9])\.[0-9]{1,2}\.[0-9]{1,3}.*/\1/') | ||
13 | if [ "$KVER_MAJOR" = "2" ]; then | ||
14 | --- lxc-0.9.0.orig/src/lxc/lxc-netstat.in | ||
15 | +++ lxc-0.9.0/src/lxc/lxc-netstat.in | ||
16 | @@ -107,7 +107,7 @@ if [ ! -d "$parent_cgroup" ]; then | ||
17 | exit 1 | ||
18 | fi | ||
19 | |||
20 | -pid=$(head -1 $parent_cgroup/$name/tasks) | ||
21 | +pid=$(head -n 1 $parent_cgroup/$name/tasks) | ||
22 | |||
23 | if [ -z "$pid" ]; then | ||
24 | echo "$(basename $0): no process found for '$name'" >&2 | ||
25 | --- lxc-0.9.0.orig/templates/lxc-alpine.in | ||
26 | +++ lxc-0.9.0/templates/lxc-alpine.in | ||
27 | @@ -99,7 +99,7 @@ EOF | ||
28 | if [ "$nics" -eq 1 ] && ! grep -q "^lxc.network.hwaddr" $path/config; then | ||
29 | # see http://sourceforge.net/tracker/?func=detail&aid=3411497&group_id=163076&atid=826303 | ||
30 | hwaddr="fe:$(dd if=/dev/urandom bs=8 count=1 2>/dev/null |od -t x8 | \ | ||
31 | - head -1 |awk '{print $2}' | cut -c1-10 |\ | ||
32 | + head -n 1 |awk '{print $2}' | cut -c1-10 |\ | ||
33 | sed 's/\(..\)/\1:/g; s/.$//')" | ||
34 | echo "lxc.network.hwaddr = $hwaddr" >> $path/config | ||
35 | fi | ||
36 | --- lxc-0.9.0.orig/templates/lxc-oracle.in | ||
37 | +++ lxc-0.9.0/templates/lxc-oracle.in | ||
38 | @@ -327,7 +327,7 @@ container_config_create() | ||
39 | # generate a hwaddr for the container with a high mac address | ||
40 | # see http://sourceforge.net/tracker/?func=detail&aid=3411497&group_id=163076&atid=826303 | ||
41 | local hwaddr="fe:`dd if=/dev/urandom bs=8 count=1 2>/dev/null |od -t x8 | \ | ||
42 | - head -1 |awk '{print $2}' | cut -c1-10 |\ | ||
43 | + head -n 1 |awk '{print $2}' | cut -c1-10 |\ | ||
44 | sed 's/\(..\)/\1:/g; s/.$//'`" | ||
45 | mkdir -p $cfg_dir || die "unable to create config dir $cfg_dir" | ||
46 | cat <<EOF >> $cfg_dir/config || die "unable to create $cfg_dir/config" | ||
diff --git a/recipes-containers/lxc/lxc_0.9.0.bb b/recipes-containers/lxc/lxc_0.9.0.bb index 24e02495..4bbc1c1e 100644 --- a/recipes-containers/lxc/lxc_0.9.0.bb +++ b/recipes-containers/lxc/lxc_0.9.0.bb | |||
@@ -27,6 +27,7 @@ SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \ | |||
27 | file://lxc-0.9.0-check-when-bind-mounting-libdirs.patch \ | 27 | file://lxc-0.9.0-check-when-bind-mounting-libdirs.patch \ |
28 | file://lxc-0.9.0-don-t-let-LXC_PATH-end-in-failure.patch \ | 28 | file://lxc-0.9.0-don-t-let-LXC_PATH-end-in-failure.patch \ |
29 | file://lxc-0.9.0-setup_netdev-re-read-ifindex-in-LXC_NET_PHYS-case.patch \ | 29 | file://lxc-0.9.0-setup_netdev-re-read-ifindex-in-LXC_NET_PHYS-case.patch \ |
30 | file://lxc-0.9.0-use-susv3-head-arguments.patch \ | ||
30 | " | 31 | " |
31 | SRC_URI[md5sum] = "8552a4479090616f4bc04d8473765fc9" | 32 | SRC_URI[md5sum] = "8552a4479090616f4bc04d8473765fc9" |
32 | SRC_URI[sha256sum] = "1e1767eae6cc5fbf892c0e193d25da420ba19f2db203716c38f7cdea3b654120" | 33 | SRC_URI[sha256sum] = "1e1767eae6cc5fbf892c0e193d25da420ba19f2db203716c38f7cdea3b654120" |