diff --git a/templates/lxc-altlinux.in b/templates/lxc-altlinux.in index cc6f6d62f..8694eb6f3 100644 --- a/templates/lxc-altlinux.in +++ b/templates/lxc-altlinux.in @@ -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 diff --git a/templates/lxc-archlinux.in b/templates/lxc-archlinux.in index 1b9b7ec39..15283df19 100644 --- a/templates/lxc-archlinux.in +++ b/templates/lxc-archlinux.in @@ -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 diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in index 90b995a07..e5a512a4a 100644 --- a/templates/lxc-busybox.in +++ b/templates/lxc-busybox.in @@ -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 diff --git a/templates/lxc-centos.in b/templates/lxc-centos.in index 7be75d36b..55e053137 100644 --- a/templates/lxc-centos.in +++ b/templates/lxc-centos.in @@ -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 diff --git a/templates/lxc-cirros.in b/templates/lxc-cirros.in index 3ef212a21..986b2b129 100644 --- a/templates/lxc-cirros.in +++ b/templates/lxc-cirros.in @@ -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 diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in index 33ce8e2ea..7ad8e3cb2 100644 --- a/templates/lxc-debian.in +++ b/templates/lxc-debian.in @@ -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 diff --git a/templates/lxc-download.in b/templates/lxc-download.in index f4bd6eb42..53b06e73f 100644 --- a/templates/lxc-download.in +++ b/templates/lxc-download.in @@ -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 "---" diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in index 92efb91ab..20204d4ce 100644 --- a/templates/lxc-fedora.in +++ b/templates/lxc-fedora.in @@ -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 diff --git a/templates/lxc-gentoo.in b/templates/lxc-gentoo.in index 3e254ffcc..a5aee2ec6 100644 --- a/templates/lxc-gentoo.in +++ b/templates/lxc-gentoo.in @@ -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 diff --git a/templates/lxc-openmandriva.in b/templates/lxc-openmandriva.in index bb3e94614..4fdaeceaf 100644 --- a/templates/lxc-openmandriva.in +++ b/templates/lxc-openmandriva.in @@ -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 diff --git a/templates/lxc-opensuse.in b/templates/lxc-opensuse.in index bd33f568a..1a3406e6b 100644 --- a/templates/lxc-opensuse.in +++ b/templates/lxc-opensuse.in @@ -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 diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index f19b7d0aa..a82b81ff8 100644 --- a/templates/lxc-oracle.in +++ b/templates/lxc-oracle.in @@ -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 diff --git a/templates/lxc-plamo.in b/templates/lxc-plamo.in index 4e04b2256..644b8d03a 100644 --- a/templates/lxc-plamo.in +++ b/templates/lxc-plamo.in @@ -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 diff --git a/templates/lxc-sshd.in b/templates/lxc-sshd.in index 2e8a00cdc..7e3d3d8b7 100644 --- a/templates/lxc-sshd.in +++ b/templates/lxc-sshd.in @@ -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 diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in index cc74f81dc..a97201ac8 100644 --- a/templates/lxc-ubuntu.in +++ b/templates/lxc-ubuntu.in @@ -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