Commit 4bc8b185 by Serge Hallyn Committed by Stéphane Graber

lxc-create: require absolute path for non-standard templates

Otherwise, as an example, if doing 'lxc-create -t debian' while there is a 'debian' directory, lxc-create will fail to do the right thing. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 799f96fd
......@@ -291,7 +291,7 @@ fi
if [ ! -z "$lxc_template" ]; then
# Allow for a path to be provided as the template name
if [ -x "$lxc_template" ]; then
if [ -x "$lxc_template" -a $(echo "$lxc_template" | cut -c 1) = '/' ]; then
template_path=$lxc_template
else
template_path=${templatedir}/lxc-$lxc_template
......
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