[lxc-devel] [PATCH] lxc-destroy: make it work with busybox

Serge Hallyn serge.hallyn at canonical.com
Wed Nov 14 14:51:07 UTC 2012


Quoting Natanael Copa (ncopa at alpinelinux.org):
> Busybox 'rm' has no support for --one-file-system. We can make it work
> on busybox with find ... -xdev.

Hm, well it does slow it down a smidgeon, but no real objection
from me.  Still let's if anyone else has a comment.

> Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
> ---
>  src/lxc/lxc-destroy.in | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/lxc/lxc-destroy.in b/src/lxc/lxc-destroy.in
> index 846266c..f8f4b48 100644
> --- a/src/lxc/lxc-destroy.in
> +++ b/src/lxc/lxc-destroy.in
> @@ -122,9 +122,9 @@ if [ -n "$rootdev" ]; then
>  			btrfs subvolume delete "$rootdev"
>  		else
>  			# In case rootfs is not under $lxc_path/$lxc_name, remove it
> -			rm -rf --one-file-system --preserve-root $rootdev
> +			find $rootdev -xdev -delete
>  		fi
>  	fi
>  fi
>  # recursively remove the container to remove old container configuration
> -rm -rf --one-file-system --preserve-root $lxc_path/$lxc_name
> +find $lxc_path/$lxc_name -xdev -delete
> -- 
> 1.8.0
> 
> 
> ------------------------------------------------------------------------------
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or applications!
> http://p.sf.net/sfu/zoho_dev2dev_nov
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel




More information about the lxc-devel mailing list