From: Daniel Baumann Date: Tue, 31 Jul 2012 14:01:27 +0000 (+0200) Subject: Only create rootfs directory where required X-Git-Tag: lxc-0.8.0~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83366944b45bcb6acfa8c2397c6205a52104d5d0;p=thirdparty%2Flxc.git Only create rootfs directory where required 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 Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/lxc-create.in b/src/lxc/lxc-create.in index 0ad4e957f..39d6f5475 100644 --- a/src/lxc/lxc-create.in +++ b/src/lxc/lxc-create.in @@ -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