From: Serge Hallyn Date: Sun, 31 Mar 2013 22:00:10 +0000 (-0500) Subject: lxc-create: require absolute path for non-standard templates X-Git-Tag: lxc-2.1.1~2544^2~3 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=4bc8b18529e9f0ae86a004b14c2cb677701c51e5;p=mirror_lxc.git 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 Acked-by: Stéphane Graber --- diff --git a/src/lxc/lxc-create.in b/src/lxc/lxc-create.in index fec551160..ebbdd7b42 100644 --- a/src/lxc/lxc-create.in +++ b/src/lxc/lxc-create.in @@ -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