[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH] sysprep: user-account: remove the correct home



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/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]