mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-31 07:12:45 +00:00
lxc-create: refuse to use a custom rootfs (--dir) which already exists.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
0749e74060
commit
f99c7aa5de
@ -313,6 +313,10 @@ if [ -n "$custom_rootfs" ]; then
|
||||
echo "configuration file already specifies a lxc.rootfs"
|
||||
exit 1
|
||||
fi
|
||||
if [ -d "$custom_rootfs" ]; then
|
||||
echo "specified rootfs ($custom_rootfs) already exists. Bailing."
|
||||
exit 1
|
||||
fi
|
||||
echo "lxc.rootfs = $custom_rootfs" >> $lxc_path/$lxc_name/config
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user