[lxc-devel] [PATCH] templates: Make sure usual locations are in PATH

Stéphane Graber stgraber at ubuntu.com
Thu Feb 6 21:24:33 UTC 2014


Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 templates/lxc-alpine.in       | 3 +++
 templates/lxc-altlinux.in     | 3 +++
 templates/lxc-archlinux.in    | 3 +++
 templates/lxc-busybox.in      | 3 +++
 templates/lxc-centos.in       | 3 +++
 templates/lxc-cirros.in       | 3 +++
 templates/lxc-debian.in       | 3 +++
 templates/lxc-download.in     | 3 +++
 templates/lxc-fedora.in       | 3 +++
 templates/lxc-gentoo.in       | 3 +++
 templates/lxc-openmandriva.in | 3 +++
 templates/lxc-opensuse.in     | 3 +++
 templates/lxc-oracle.in       | 3 +++
 templates/lxc-plamo.in        | 3 +++
 templates/lxc-sshd.in         | 3 +++
 templates/lxc-ubuntu-cloud.in | 3 +++
 templates/lxc-ubuntu.in       | 3 +++
 17 files changed, 51 insertions(+)

diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
index d1ae9f3..5c4c585 100644
--- a/templates/lxc-alpine.in
+++ b/templates/lxc-alpine.in
@@ -10,6 +10,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 key_sha256sums="9c102bcc376af1498d549b77bdbfa815ae86faa1d2d82f040e616b18ef2df2d4  alpine-devel at lists.alpinelinux.org-4a6a0840.rsa.pub
 2adcf7ce224f476330b5360ca5edb92fd0bf91c92d83292ed028d7c4e26333ab  alpine-devel at lists.alpinelinux.org-4d07755e.rsa.pub"
 
diff --git a/templates/lxc-altlinux.in b/templates/lxc-altlinux.in
index e64ad24..cc6f6d6 100644
--- a/templates/lxc-altlinux.in
+++ b/templates/lxc-altlinux.in
@@ -34,6 +34,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 #Configurations
 arch=$(uname -m)
 cache_base=@LOCALSTATEDIR@/cache/lxc/altlinux/$arch
diff --git a/templates/lxc-archlinux.in b/templates/lxc-archlinux.in
index d3d5f73..1b9b7ec 100644
--- a/templates/lxc-archlinux.in
+++ b/templates/lxc-archlinux.in
@@ -35,6 +35,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 # defaults
 arch=$(uname -m)
 lxc_network_type="veth"
diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in
index dae1541..90b995a 100644
--- a/templates/lxc-busybox.in
+++ b/templates/lxc-busybox.in
@@ -30,6 +30,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 am_in_userns() {
     [ -e /proc/self/uid_map ] || { echo no; return; }
     [ "$(wc -l /proc/self/uid_map | awk '{ print $1 }')" -eq 1 ] || { echo yes; return; }
diff --git a/templates/lxc-centos.in b/templates/lxc-centos.in
index d089a15..7be75d3 100644
--- a/templates/lxc-centos.in
+++ b/templates/lxc-centos.in
@@ -82,6 +82,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 if [ -e /etc/os-release ]
 then
 # This is a shell friendly configuration file.  We can just source it.
diff --git a/templates/lxc-cirros.in b/templates/lxc-cirros.in
index 24c59a9..3ef212a 100644
--- a/templates/lxc-cirros.in
+++ b/templates/lxc-cirros.in
@@ -31,6 +31,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 VERBOSITY=0
 DOWNLOAD_URL="http://download.cirros-cloud.net/"
 CACHE_D="@LOCALSTATEDIR@/cache/lxc/cirros"
diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in
index cb19ba4..33ce8e2 100644
--- a/templates/lxc-debian.in
+++ b/templates/lxc-debian.in
@@ -30,6 +30,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 MIRROR=${MIRROR:-http://cdn.debian.net/debian}
 LOCALSTATEDIR="@LOCALSTATEDIR@"
 LXC_TEMPLATE_CONFIG="@LXCTEMPLATECONFIG@"
diff --git a/templates/lxc-download.in b/templates/lxc-download.in
index 3c7d926..b4acb3e 100644
--- a/templates/lxc-download.in
+++ b/templates/lxc-download.in
@@ -53,6 +53,9 @@ LXC_ROOTFS=
 LXC_MAPPED_UID=
 LXC_MAPPED_GID=
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 # Some useful functions
 cleanup() {
     if [ -d "$DOWNLOAD_TEMP" ]; then
diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in
index 5ab3852..92efb91 100644
--- a/templates/lxc-fedora.in
+++ b/templates/lxc-fedora.in
@@ -82,6 +82,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 if [ -e /etc/os-release ]
 then
 # This is a shell friendly configuration file.  We can just source it.
diff --git a/templates/lxc-gentoo.in b/templates/lxc-gentoo.in
index e59ed45..3e254ff 100644
--- a/templates/lxc-gentoo.in
+++ b/templates/lxc-gentoo.in
@@ -23,6 +23,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 # Ensure strict root's umask doesen't render the VM unusable
 umask 022
 
diff --git a/templates/lxc-openmandriva.in b/templates/lxc-openmandriva.in
index ddc9863..bb3e946 100644
--- a/templates/lxc-openmandriva.in
+++ b/templates/lxc-openmandriva.in
@@ -36,6 +36,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 #Configurations
 #distro=cooker
 hostarch=$(uname -m)
diff --git a/templates/lxc-opensuse.in b/templates/lxc-opensuse.in
index df517a6..bd33f56 100644
--- a/templates/lxc-opensuse.in
+++ b/templates/lxc-opensuse.in
@@ -35,6 +35,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 DISTRO=12.3
 
 configure_opensuse()
diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in
index ae64bc6..f19b7d0 100644
--- a/templates/lxc-oracle.in
+++ b/templates/lxc-oracle.in
@@ -37,6 +37,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 # use virbr0 that is setup by default by libvirtd
 lxc_network_type=veth
 lxc_network_link=virbr0
diff --git a/templates/lxc-plamo.in b/templates/lxc-plamo.in
index c8cf3a5..1db5645 100644
--- a/templates/lxc-plamo.in
+++ b/templates/lxc-plamo.in
@@ -38,6 +38,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 [ -r /etc/default/lxc ] && . /etc/default/lxc
 
 DLSCHEME=${DLSCHEME:-"http"}
diff --git a/templates/lxc-sshd.in b/templates/lxc-sshd.in
index 2c3cd7f..2e8a00c 100644
--- a/templates/lxc-sshd.in
+++ b/templates/lxc-sshd.in
@@ -30,6 +30,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 install_sshd()
 {
     rootfs=$1
diff --git a/templates/lxc-ubuntu-cloud.in b/templates/lxc-ubuntu-cloud.in
index 07cb87d..5de1dbd 100644
--- a/templates/lxc-ubuntu-cloud.in
+++ b/templates/lxc-ubuntu-cloud.in
@@ -28,6 +28,9 @@ LXC_TEMPLATE_CONFIG="@LXCTEMPLATECONFIG@"
 KNOWN_RELEASES="lucid precise quantal saucy trusty"
 skip_arch_check=${UCTEMPLATE_SKIP_ARCH_CHECK:-0}
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 if [ -r /etc/default/lxc ]; then
     . /etc/default/lxc
 fi
diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in
index 85df042..cc74f81 100644
--- a/templates/lxc-ubuntu.in
+++ b/templates/lxc-ubuntu.in
@@ -34,6 +34,9 @@ for arg in "$@"; do
     fi
 done
 
+# Make sure the usual locations are in PATH
+export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
+
 set -e
 
 LOCALSTATEDIR="@LOCALSTATEDIR@"
-- 
1.9.rc1



More information about the lxc-devel mailing list