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)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
# Detect use under userns (unsupported)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
# Detect use under userns (unsupported)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
# This library is distributed in the hope that it will be useful,
|
# This library is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# 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.
|
# Lesser General Public License for more details.
|
||||||
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
# 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)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
# Detect use under userns (unsupported)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
# Detect use under userns (unsupported)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -301,7 +301,7 @@ if [ "$DOWNLOAD_LIST_IMAGES" = "true" ] || \
|
|||||||
# Parse it
|
# Parse it
|
||||||
echo ""
|
echo ""
|
||||||
echo "---"
|
echo "---"
|
||||||
echo "DIST\tRELEASE\tARCH\tVARIANT\tBUILD"
|
printf "DIST\tRELEASE\tARCH\tVARIANT\tBUILD\n"
|
||||||
echo "---"
|
echo "---"
|
||||||
while read line; do
|
while read line; do
|
||||||
# Basic CSV parser
|
# Basic CSV parser
|
||||||
@ -316,7 +316,7 @@ if [ "$DOWNLOAD_LIST_IMAGES" = "true" ] || \
|
|||||||
[ -n "$DOWNLOAD_VARIANT" ] && [ "$4" != "$DOWNLOAD_VARIANT" ] && continue
|
[ -n "$DOWNLOAD_VARIANT" ] && [ "$4" != "$DOWNLOAD_VARIANT" ] && continue
|
||||||
[ -z "$5" ] || [ -z "$6" ] && 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
|
done < ${DOWNLOAD_TEMP}/index
|
||||||
echo "---"
|
echo "---"
|
||||||
|
|
||||||
|
@ -74,8 +74,8 @@ lxc_network_link=lxcbr0
|
|||||||
|
|
||||||
# Detect use under userns (unsupported)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
# Detect use under userns (unsupported)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
|
|
||||||
# Detect use under userns (unsupported)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
# Detect use under userns (unsupported)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -29,8 +29,8 @@
|
|||||||
|
|
||||||
# Detect use under userns (unsupported)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
|
|
||||||
# Detect use under userns (unsupported)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
# Detect use under userns (unsupported)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -26,8 +26,8 @@
|
|||||||
|
|
||||||
# Detect use under userns (unsupported)
|
# Detect use under userns (unsupported)
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
[ "$arg" == "--" ] && break
|
[ "$arg" = "--" ] && break
|
||||||
if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
|
if [ "$arg" = "--mapped-uid" -o "$arg" = "--mapped-gid" ]; then
|
||||||
echo "This template can't be used for unprivileged containers." 1>&2
|
echo "This template can't be used for unprivileged containers." 1>&2
|
||||||
echo "You may want to try the \"download\" template instead." 1>&2
|
echo "You may want to try the \"download\" template instead." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user