]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
templates: Fix bashisms in common code
authorStéphane Graber <stgraber@ubuntu.com>
Wed, 19 Feb 2014 15:45:14 +0000 (10:45 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 19 Feb 2014 15:45:14 +0000 (10:45 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
15 files changed:
templates/lxc-altlinux.in
templates/lxc-archlinux.in
templates/lxc-busybox.in
templates/lxc-centos.in
templates/lxc-cirros.in
templates/lxc-debian.in
templates/lxc-download.in
templates/lxc-fedora.in
templates/lxc-gentoo.in
templates/lxc-openmandriva.in
templates/lxc-opensuse.in
templates/lxc-oracle.in
templates/lxc-plamo.in
templates/lxc-sshd.in
templates/lxc-ubuntu.in

index cc6f6d62ff3ac4b0de3282540e20d88a27c6b8ba..8694eb6f34fcacfdc1606fcd8bf4d1a0687ed76b 100644 (file)
@@ -26,8 +26,8 @@
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1
index 1b9b7ec39e7b5fc6a100e3ac028ced55ec9815b8..15283df19c2ae66515c8501c02d8ee11e347d42f 100644 (file)
@@ -27,8 +27,8 @@
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1
index 90b995a0714a82a202fa3a16729f52b057760a75..e5a512a4a48b9b856884af76d280a1a561c0f7dc 100644 (file)
@@ -22,8 +22,8 @@
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1
index 7be75d36be42ef8597fc873541fa3cd7a56c64a5..55e053137af9040b69804e28c07fd723895f49c8 100644 (file)
@@ -19,7 +19,7 @@
 
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # Lesser General Public License for more details.
 
 # You should have received a copy of the GNU Lesser General Public
@@ -74,8 +74,8 @@ lxc_network_link=lxcbr0
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1
index 3ef212a2115e7f4f7d393ed73ae287a12525e15d..986b2b1292f4beafa7725d571dc00573b504e714 100644 (file)
@@ -23,8 +23,8 @@
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1
index 33ce8e2ea0a701dca8fecd8d4bb6e057975d0347..7ad8e3cb2b18b5e3960c25ff941cb8ab45990c74 100644 (file)
@@ -22,8 +22,8 @@
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1
index f4bd6eb423dde3fba4567f45b7b657d2066729b9..53b06e73f590ef9c34655213eeecb00fd996f3df 100644 (file)
@@ -301,7 +301,7 @@ if [ "$DOWNLOAD_LIST_IMAGES" = "true" ] || \
     # Parse it
     echo ""
     echo "---"
-    echo "DIST\tRELEASE\tARCH\tVARIANT\tBUILD"
+    printf "DIST\tRELEASE\tARCH\tVARIANT\tBUILD\n"
     echo "---"
     while read line; do
         # Basic CSV parser
@@ -316,7 +316,7 @@ if [ "$DOWNLOAD_LIST_IMAGES" = "true" ] || \
         [ -n "$DOWNLOAD_VARIANT" ] && [ "$4" != "$DOWNLOAD_VARIANT" ] && continue
         [ -z "$5" ] || [ -z "$6" ] && continue
 
-        echo "$1\t$2\t$3\t$4\t$5"
+        printf "$1\t$2\t$3\t$4\t$5\n"
     done < ${DOWNLOAD_TEMP}/index
     echo "---"
 
index 92efb91ab2819949fd0f43a569c7205f0a768762..20204d4ced580d3464924f457554681b8d3f1b68 100644 (file)
@@ -74,8 +74,8 @@ lxc_network_link=lxcbr0
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1
index 3e254ffccfdce1c5732b026d1f47c972b97f12c8..a5aee2ec60a8d6c53a81ce32a4335ab63456b73f 100644 (file)
@@ -15,8 +15,8 @@
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1
index bb3e946145d9794e78eb3fc6a62c1a52078eeb41..4fdaeceafee9abb8d0ff33913101ffb05996af50 100644 (file)
@@ -28,8 +28,8 @@
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1
index bd33f568a35f7e6d49b04bce0c29c5746efd7907..1a3406e6b8719258b76441a8001c6de2ec688a59 100644 (file)
@@ -27,8 +27,8 @@
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1
index f19b7d0aa7285f03ca8a5802bdd6959c7c9db32c..a82b81ff8e379faf9b5e72916d06a3dee99c915d 100644 (file)
@@ -29,8 +29,8 @@
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1
index 4e04b2256e92829aad569ff3cd27ff8169929d8e..644b8d03a0fdc8f6b6d782ae57e66c49462e77ea 100644 (file)
@@ -30,8 +30,8 @@
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1
index 2e8a00cdc673399fe85993c99d911dbc64e8b38a..7e3d3d8b70dc20f746348897325a23a2423f8d73 100644 (file)
@@ -22,8 +22,8 @@
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1
index cc74f81dcd4d1d8ff9faa09058af49ac138ca54f..a97201ac806bc84cc59f9fcacb600e9912ab101f 100644 (file)
@@ -26,8 +26,8 @@
 
 # Detect use under userns (unsupported)
 for arg in "$@"; do
-    [ "$arg" == "--" ] && break
-    if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
+    [ "$arg" = "--" ] && break
+    if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
         echo "This template can't be used for unprivileged containers." 1>&2
         echo "You may want to try the \"download\" template instead." 1>&2
         exit 1