mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-06 08:39:22 +00:00
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: Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
799f96fdd8
commit
4bc8b18529
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user