]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Only create rootfs directory where required
authorDaniel Baumann <daniel.baumann@progress-technologies.net>
Tue, 31 Jul 2012 14:01:27 +0000 (16:01 +0200)
committerDaniel Lezcano <daniel.lezcano@free.fr>
Tue, 31 Jul 2012 14:01:27 +0000 (16:01 +0200)
In general, lxc-create should not mess with this and leave it entirely
up to the templates to create it.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc-create.in

index 0ad4e957ff5ff112d4bbd9a70e4ddb45fd955774..39d6f5475af8b1a3ccc888438e39fe61b4c045dd 100644 (file)
@@ -249,8 +249,8 @@ else
 fi
 
 # Create the fs as needed
-[ -d "$rootfs" ] || mkdir $rootfs
 if [ $backingstore = "lvm" ]; then
+    [ -d "$rootfs" ] || mkdir $rootfs
     lvcreate -L $fssize -n $lvname $vgname || exit 1
     udevadm settle
     mkfs -t $fstype $rootdev || exit 1