From: Stéphane Graber Date: Thu, 6 Feb 2014 21:23:59 +0000 (-0500) Subject: templates: Make sure usual locations are in PATH X-Git-Tag: lxc-1.0.0.beta4~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=207bf0e475f1dc6e9a2dac2cee3a209b56427855;p=thirdparty%2Flxc.git templates: Make sure usual locations are in PATH Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in index d1ae9f3ff..5c4c58506 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@lists.alpinelinux.org-4a6a0840.rsa.pub 2adcf7ce224f476330b5360ca5edb92fd0bf91c92d83292ed028d7c4e26333ab alpine-devel@lists.alpinelinux.org-4d07755e.rsa.pub" diff --git a/templates/lxc-altlinux.in b/templates/lxc-altlinux.in index e64ad24c6..cc6f6d62f 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 d3d5f73c2..1b9b7ec39 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 dae154121..90b995a07 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 d089a1557..7be75d36b 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 24c59a9c1..3ef212a21 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 cb19ba484..33ce8e2ea 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 d615b8db6..7334e5494 100644 --- a/templates/lxc-download.in +++ b/templates/lxc-download.in @@ -58,6 +58,9 @@ if [ -n "${http_proxy:-}" ]; then DOWNLOAD_KEYSERVER="${DOWNLOAD_KEYSERVER}:80" fi +# 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 5ab3852ab..92efb91ab 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 e59ed4572..3e254ffcc 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 ddc9863fa..bb3e94614 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 df517a699..bd33f568a 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 ae64bc634..f19b7d0aa 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 c8cf3a507..1db5645c2 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 2c3cd7fc9..2e8a00cdc 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 07cb87d9b..5de1dbd59 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 85df042fa..cc74f81dc 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@"