summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-04-03 10:24:23 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-04-03 10:24:27 +0100
commit5c8a241e5cd119f436a050ddbbf7ea73f83ff8e4 (patch)
tree4c8efcdc4b67375862d89cae6846df4c36cf26c9
parent04ddf3cfa2915c811b9a8b72fd3bd17484d26683 (diff)
downloadlibguestfs-5c8a241e5cd119f436a050ddbbf7ea73f83ff8e4.tar.gz
libguestfs-5c8a241e5cd119f436a050ddbbf7ea73f83ff8e4.tar.xz
libguestfs-5c8a241e5cd119f436a050ddbbf7ea73f83ff8e4.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+).
-rw-r--r--src/inspect_fs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/inspect_fs.c b/src/inspect_fs.c
index 7e6ff655..baae5428 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;