[Libguestfs] [PATCH] sysprep: user-account: remove the correct home
Richard W.M. Jones
rjones at redhat.com
Tue Sep 2 17:43:22 UTC 2014
On Tue, Sep 02, 2014 at 06:15:11PM +0200, Pino Toscano wrote:
> So should the user still be removed? In such case, I guess something
> like (simplified):
>
> let home_dir =
> try Some g#aug_get (userpath ^ "/home")
> with _ ->
> if verbose then warning "Cannot get the home directory for $user";
> None in
> ...
> match home_dir with
> | None -> ()
> | Some dir -> g#rm_rf dir
>
> ?
That works for me.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
More information about the Libguestfs
mailing list