]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
templates/*.in: fixed PATH handling with spaces 3772/head
authorChristian Ratzenhofer <christian.ratzenhofer@cdnm.at>
Tue, 6 Apr 2021 12:39:11 +0000 (14:39 +0200)
committerChristian Ratzenhofer <christian.ratzenhofer@cdnm.at>
Tue, 6 Apr 2021 12:43:11 +0000 (14:43 +0200)
if $PATH already contains a path with a space the append of the
default directories in all template scripts fails with an error
like the following:

/usr/share/lxc/templates/lxc-download: 69: export: (x86)/NVIDIA: bad
variable name

Signed-off-by: Christian Ratzenhofer <christian.ratzenhofer@cdnm.at>
templates/lxc-busybox.in
templates/lxc-download.in
templates/lxc-local.in
templates/lxc-oci.in

index 1a8618b1a1364aac553efdbaaae65406627ddc7e..266be60cc5bdd45606d905425da15e52bf25c97c 100644 (file)
@@ -26,7 +26,7 @@ LXC_MAPPED_GID=
 BUSYBOX_EXE=`which busybox`
 
 # Make sure the usual locations are in PATH
-export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin"
 
 in_userns() {
   [ -e /proc/self/uid_map ] || { echo no; return; }
index d688b8f41a82df37b8cf19752860eef4a07ac24c..72903c49723ebd8b44b74bec7c1e2d99dea3663e 100644 (file)
@@ -66,7 +66,7 @@ if [ -z "${DOWNLOAD_KEYSERVER:-}" ]; then
 fi
 
 # Make sure the usual locations are in PATH
-export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin"
 
 # Some useful functions
 cleanup() {
index 2e96d63ebfadbca0bec191501b4f78bf251237ee..f94a150c7cc193cae53a3215bab0e07079e60bc9 100644 (file)
@@ -33,7 +33,7 @@ MODE="system"
 COMPAT_LEVEL=5
 
 # Make sure the usual locations are in PATH
-export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin"
 
 in_userns() {
   [ -e /proc/self/uid_map ] || { echo no; return; }
index dab077191b106781b31aacb5c190777f2004fd1d..a46949b688e13a530597d10305a36dcbf665222e 100644 (file)
@@ -23,7 +23,7 @@
 set -eu
 
 # Make sure the usual locations are in PATH
-export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin"
 
 # Check for required binaries
 for bin in skopeo umoci jq; do