diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-04-03 10:24:23 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-04-03 13:45:24 +0100 |
commit | 525c5470b7b1b2268d5bdcf6dcfed056360a7ec5 (patch) | |
tree | b8ec4b95c6d2e31ba688b8d646abc3df493d275e | |
parent | d147bd4c75cbeac3ccdf906c0cedb10468b9168f (diff) | |
download | libguestfs-525c5470b7b1b2268d5bdcf6dcfed056360a7ec5.tar.gz libguestfs-525c5470b7b1b2268d5bdcf6dcfed056360a7ec5.tar.xz libguestfs-525c5470b7b1b2268d5bdcf6dcfed056360a7ec5.zip |
inspection: Support Fedora 17+ (RHBZ#809361).
Recognize grub2 as a bootloader, and /bin being a symlink to
/usr/bin (ie. UsrMove feature added in Fedora 17+).
(cherry picked from commit 5c8a241e5cd119f436a050ddbbf7ea73f83ff8e4)
-rw-r--r-- | src/inspect_fs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/inspect_fs.c b/src/inspect_fs.c index fa7aaa84..fbbdda41 100644 --- a/src/inspect_fs.c +++ b/src/inspect_fs.c @@ -170,7 +170,8 @@ check_filesystem (guestfs_h *g, const char *device, /* Grub /boot? */ if (guestfs_is_file (g, "/grub/menu.lst") > 0 || - guestfs_is_file (g, "/grub/grub.conf") > 0) + guestfs_is_file (g, "/grub/grub.conf") > 0 || + guestfs_is_file (g, "/grub2/grub.cfg") > 0) fs->content = FS_CONTENT_LINUX_BOOT; /* FreeBSD root? */ else if (is_dir_etc && @@ -219,7 +220,9 @@ check_filesystem (guestfs_h *g, const char *device, } /* Linux root? */ else if (is_dir_etc && - is_dir_bin && + (is_dir_bin || + (guestfs_is_symlink (g, "/bin") > 0 && + guestfs_is_dir (g, "/usr/bin") > 0)) && guestfs_is_file (g, "/etc/fstab") > 0) { fs->is_root = 1; fs->content = FS_CONTENT_LINUX_ROOT; |