templates: Fix bashisms in common code

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
Stéphane Graber 2014-02-19 10:45:14 -05:00
parent 95ab9daa02
commit 96283b5460
No known key found for this signature in database
GPG Key ID: C638974D64792D67
15 changed files with 31 additions and 31 deletions

View 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

View 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

View 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

View 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

View 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

View 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

View 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 "---"

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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