On 05/09/2012 07:49 PM, Richard W.M. Jones wrote:
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
places:
/var/run/blkid.tab
/etc/blkid/blkid.tab
/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:
http://libguestfs.org/guestfs.3.html#guestfs_is_symlink
Yeah, I see, thank you, I'll update the patch tomorrow.
Wanlong Gao
Rich.