mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-12 21:56:03 +00:00
templates: Fix bashisms in common code
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
95ab9daa02
commit
96283b5460
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 "---"
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user