[Lxc-users] lxc-destroy fs

zoolook nbensa+lxcusers at gmail.com
Thu Mar 7 20:43:43 UTC 2013


On Thu, Mar 7, 2013 at 5:21 PM, Papp Tamas <tompos at martos.bme.hu> wrote:
>>>           else
>>>               # In case rootfs is not under $lxc_path/$lxc_name, remove it
>>>               rm -rf --one-file-system --preserve-root $rootdev
>
> But it's removed here.

....

> Do I miss something?

If you don't want it to remove $rootdev, why are you doing rm -rf $rootdev?

I think you miss one "if" there. Something like:

if [ "$rootfs" == "$lxc_path/$lxc_name/rootfs" ]:
  rm -rf .....
fi

HTH,
Norberto




More information about the lxc-users mailing list