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

Re: [Libguestfs] [PATCH 2/2] sysprep: remove blkid tab in the guest

On Wed, May 09, 2012 at 06:08:55PM +0800, Wanlong Gao wrote:
> +    let files = g#glob_expand "/etc/blkid/*tab*" in

Good idea in principle, but you have to delete the file in a few more

  /etc/blkid.tab       # older debian
  /dev/.blkid.tab      # newer debian

AND! ... you have to check that the file you're going to remove isn't
a symbolic link.  Because at least on some versions of debian,
/etc/blkid.tab is a symlink, and you *don't* want to remove it.

There is a g#is_symlink function for checking if a path is a symlink:



Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)

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