summaryrefslogtreecommitdiffstats
path: root/recipes-containers/lxc/files/lxc-0.9.0-use-susv3-head-arguments.patch
blob: 86ed7d250040874249222311489341191b0c1cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Upstream-status: Pending

--- lxc-0.9.0.orig/src/lxc/lxc-checkconfig.in
+++ lxc-0.9.0/src/lxc/lxc-checkconfig.in
@@ -67,7 +67,7 @@ print_cgroups() {
   awk '$1 !~ /#/ && $3 == mp { print $2; } ; END { exit(0); } '  "mp=$1" "$2" ;
 }

-CGROUP_MNT_PATH=`print_cgroups cgroup /proc/self/mounts | head -1`
+CGROUP_MNT_PATH=`print_cgroups cgroup /proc/self/mounts | head -n 1`
 KVER_MAJOR=$($GREP '^# Linux' $CONFIG | \
     sed -r 's/.* ([0-9])\.[0-9]{1,2}\.[0-9]{1,3}.*/\1/')
 if [ "$KVER_MAJOR" = "2" ]; then
--- lxc-0.9.0.orig/src/lxc/lxc-netstat.in
+++ lxc-0.9.0/src/lxc/lxc-netstat.in
@@ -107,7 +107,7 @@ if [ ! -d "$parent_cgroup" ]; then
     exit 1
 fi

-pid=$(head -1 $parent_cgroup/$name/tasks)
+pid=$(head -n 1 $parent_cgroup/$name/tasks)

 if [ -z "$pid" ]; then
     echo "$(basename $0): no process found for '$name'" >&2
--- lxc-0.9.0.orig/templates/lxc-alpine.in
+++ lxc-0.9.0/templates/lxc-alpine.in
@@ -99,7 +99,7 @@ EOF
     if [ "$nics" -eq 1 ] && ! grep -q "^lxc.network.hwaddr" $path/config; then
         # see http://sourceforge.net/tracker/?func=detail&aid=3411497&group_id=163076&atid=826303
         hwaddr="fe:$(dd if=/dev/urandom bs=8 count=1 2>/dev/null |od -t x8 | \
-                      head -1 |awk '{print $2}' | cut -c1-10 |\
+                      head -n 1 |awk '{print $2}' | cut -c1-10 |\
                       sed 's/\(..\)/\1:/g; s/.$//')"
         echo "lxc.network.hwaddr = $hwaddr" >> $path/config
     fi
--- lxc-0.9.0.orig/templates/lxc-oracle.in
+++ lxc-0.9.0/templates/lxc-oracle.in
@@ -327,7 +327,7 @@ container_config_create()
     # generate a hwaddr for the container with a high mac address
     # see http://sourceforge.net/tracker/?func=detail&aid=3411497&group_id=163076&atid=826303
     local hwaddr="fe:`dd if=/dev/urandom bs=8 count=1 2>/dev/null |od -t x8 | \
-                      head -1 |awk '{print $2}' | cut -c1-10 |\
+                      head -n 1 |awk '{print $2}' | cut -c1-10 |\
                       sed 's/\(..\)/\1:/g; s/.$//'`"
     mkdir -p $cfg_dir || die "unable to create config dir $cfg_dir"
     cat <<EOF >> $cfg_dir/config || die "unable to create $cfg_dir/config"