Commit 207bf0e4 by Stéphane Graber

templates: Make sure usual locations are in PATH

parent 4eb706b3
...@@ -10,6 +10,9 @@ for arg in "$@"; do ...@@ -10,6 +10,9 @@ for arg in "$@"; do
fi fi
done 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 key_sha256sums="9c102bcc376af1498d549b77bdbfa815ae86faa1d2d82f040e616b18ef2df2d4 alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub
2adcf7ce224f476330b5360ca5edb92fd0bf91c92d83292ed028d7c4e26333ab alpine-devel@lists.alpinelinux.org-4d07755e.rsa.pub" 2adcf7ce224f476330b5360ca5edb92fd0bf91c92d83292ed028d7c4e26333ab alpine-devel@lists.alpinelinux.org-4d07755e.rsa.pub"
......
...@@ -34,6 +34,9 @@ for arg in "$@"; do ...@@ -34,6 +34,9 @@ for arg in "$@"; do
fi fi
done done
# Make sure the usual locations are in PATH
export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
#Configurations #Configurations
arch=$(uname -m) arch=$(uname -m)
cache_base=@LOCALSTATEDIR@/cache/lxc/altlinux/$arch cache_base=@LOCALSTATEDIR@/cache/lxc/altlinux/$arch
......
...@@ -35,6 +35,9 @@ for arg in "$@"; do ...@@ -35,6 +35,9 @@ for arg in "$@"; do
fi fi
done done
# Make sure the usual locations are in PATH
export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
# defaults # defaults
arch=$(uname -m) arch=$(uname -m)
lxc_network_type="veth" lxc_network_type="veth"
......
...@@ -30,6 +30,9 @@ for arg in "$@"; do ...@@ -30,6 +30,9 @@ for arg in "$@"; do
fi fi
done done
# Make sure the usual locations are in PATH
export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
am_in_userns() { am_in_userns() {
[ -e /proc/self/uid_map ] || { echo no; return; } [ -e /proc/self/uid_map ] || { echo no; return; }
[ "$(wc -l /proc/self/uid_map | awk '{ print $1 }')" -eq 1 ] || { echo yes; return; } [ "$(wc -l /proc/self/uid_map | awk '{ print $1 }')" -eq 1 ] || { echo yes; return; }
......
...@@ -82,6 +82,9 @@ for arg in "$@"; do ...@@ -82,6 +82,9 @@ for arg in "$@"; do
fi fi
done done
# Make sure the usual locations are in PATH
export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
if [ -e /etc/os-release ] if [ -e /etc/os-release ]
then then
# This is a shell friendly configuration file. We can just source it. # This is a shell friendly configuration file. We can just source it.
......
...@@ -31,6 +31,9 @@ for arg in "$@"; do ...@@ -31,6 +31,9 @@ for arg in "$@"; do
fi fi
done done
# Make sure the usual locations are in PATH
export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
VERBOSITY=0 VERBOSITY=0
DOWNLOAD_URL="http://download.cirros-cloud.net/" DOWNLOAD_URL="http://download.cirros-cloud.net/"
CACHE_D="@LOCALSTATEDIR@/cache/lxc/cirros" CACHE_D="@LOCALSTATEDIR@/cache/lxc/cirros"
......
...@@ -30,6 +30,9 @@ for arg in "$@"; do ...@@ -30,6 +30,9 @@ for arg in "$@"; do
fi fi
done 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} MIRROR=${MIRROR:-http://cdn.debian.net/debian}
LOCALSTATEDIR="@LOCALSTATEDIR@" LOCALSTATEDIR="@LOCALSTATEDIR@"
LXC_TEMPLATE_CONFIG="@LXCTEMPLATECONFIG@" LXC_TEMPLATE_CONFIG="@LXCTEMPLATECONFIG@"
......
...@@ -58,6 +58,9 @@ if [ -n "${http_proxy:-}" ]; then ...@@ -58,6 +58,9 @@ if [ -n "${http_proxy:-}" ]; then
DOWNLOAD_KEYSERVER="${DOWNLOAD_KEYSERVER}:80" DOWNLOAD_KEYSERVER="${DOWNLOAD_KEYSERVER}:80"
fi fi
# Make sure the usual locations are in PATH
export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
# Some useful functions # Some useful functions
cleanup() { cleanup() {
if [ -d "$DOWNLOAD_TEMP" ]; then if [ -d "$DOWNLOAD_TEMP" ]; then
......
...@@ -82,6 +82,9 @@ for arg in "$@"; do ...@@ -82,6 +82,9 @@ for arg in "$@"; do
fi fi
done done
# Make sure the usual locations are in PATH
export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
if [ -e /etc/os-release ] if [ -e /etc/os-release ]
then then
# This is a shell friendly configuration file. We can just source it. # This is a shell friendly configuration file. We can just source it.
......
...@@ -23,6 +23,9 @@ for arg in "$@"; do ...@@ -23,6 +23,9 @@ for arg in "$@"; do
fi fi
done 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 # Ensure strict root's umask doesen't render the VM unusable
umask 022 umask 022
......
...@@ -36,6 +36,9 @@ for arg in "$@"; do ...@@ -36,6 +36,9 @@ for arg in "$@"; do
fi fi
done done
# Make sure the usual locations are in PATH
export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
#Configurations #Configurations
#distro=cooker #distro=cooker
hostarch=$(uname -m) hostarch=$(uname -m)
......
...@@ -35,6 +35,9 @@ for arg in "$@"; do ...@@ -35,6 +35,9 @@ for arg in "$@"; do
fi fi
done done
# Make sure the usual locations are in PATH
export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
DISTRO=12.3 DISTRO=12.3
configure_opensuse() configure_opensuse()
......
...@@ -37,6 +37,9 @@ for arg in "$@"; do ...@@ -37,6 +37,9 @@ for arg in "$@"; do
fi fi
done 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 # use virbr0 that is setup by default by libvirtd
lxc_network_type=veth lxc_network_type=veth
lxc_network_link=virbr0 lxc_network_link=virbr0
......
...@@ -38,6 +38,9 @@ for arg in "$@"; do ...@@ -38,6 +38,9 @@ for arg in "$@"; do
fi fi
done 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 [ -r /etc/default/lxc ] && . /etc/default/lxc
DLSCHEME=${DLSCHEME:-"http"} DLSCHEME=${DLSCHEME:-"http"}
......
...@@ -30,6 +30,9 @@ for arg in "$@"; do ...@@ -30,6 +30,9 @@ for arg in "$@"; do
fi fi
done done
# Make sure the usual locations are in PATH
export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
install_sshd() install_sshd()
{ {
rootfs=$1 rootfs=$1
......
...@@ -28,6 +28,9 @@ LXC_TEMPLATE_CONFIG="@LXCTEMPLATECONFIG@" ...@@ -28,6 +28,9 @@ LXC_TEMPLATE_CONFIG="@LXCTEMPLATECONFIG@"
KNOWN_RELEASES="lucid precise quantal saucy trusty" KNOWN_RELEASES="lucid precise quantal saucy trusty"
skip_arch_check=${UCTEMPLATE_SKIP_ARCH_CHECK:-0} 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 if [ -r /etc/default/lxc ]; then
. /etc/default/lxc . /etc/default/lxc
fi fi
......
...@@ -34,6 +34,9 @@ for arg in "$@"; do ...@@ -34,6 +34,9 @@ for arg in "$@"; do
fi fi
done done
# Make sure the usual locations are in PATH
export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
set -e set -e
LOCALSTATEDIR="@LOCALSTATEDIR@" LOCALSTATEDIR="@LOCALSTATEDIR@"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment