]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
use susv3 head arguments
authorBogdan Purcareata <bogdan.purcareata@freescale.com>
Thu, 30 Jan 2014 17:07:21 +0000 (12:07 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 31 Jan 2014 09:38:23 +0000 (09:38 +0000)
Without enabling INCLUDE_SUSv2 in busybox, we need to use head's -n argument,
rather than -#.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc-checkconfig.in
src/tests/lxc-test-ubuntu
templates/lxc-alpine.in
templates/lxc-oracle.in

index b49e76edf44432b21760fed60112d17a489286bd..5e35a8173dea03c06a51add471b9912a2a7528f6 100644 (file)
@@ -77,7 +77,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 -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
index be69eecfc880b289287791b341d256fd0c8085db..01eb056295f9e789df6d6ac0def2ef62cdec2bd6 100755 (executable)
@@ -59,7 +59,7 @@ for template in ubuntu ubuntu-cloud; do
        lxc-wait -n $name -s RUNNING || FAIL "waiting for $template container to run"
 
        for tries in `seq 1 20`; do
-               lxcip=$(lxc-info -i -n $name -H | head -1)
+               lxcip=$(lxc-info -i -n $name -H | head -1)
                [ -z "$lxcip" ] || break
                sleep 1
        done
index ec6b802af64e1404a083425530d5827d369ffb69..70da08de93446eb8fe17179ec1b41879ec7642f9 100644 (file)
@@ -189,7 +189,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 -1 |awk '{print $2}' | cut -c1-10 |\
                       sed 's/\(..\)/\1:/g; s/.$//')"
         echo "lxc.network.hwaddr = $hwaddr" >> $path/config
     fi
index 80c2df21571d243fd01632af0b68b45cc9f08770..40fe5c0f92aaccb8cef55eeabc1c79896833b622 100644 (file)
@@ -382,7 +382,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 -1 |awk '{print $2}' | cut -c1-10 |\
                       sed 's/\(..\)/\1:/g; s/.$//'`"
     cat <<EOF >> $cfg_dir/config || die "unable to create $cfg_dir/config"
 # Container configuration for Oracle Linux $container_release_major.$container_release_minor