Blame SOURCES/0055-RHEL-7-Ignore-etc-release-if-etc-redhat-release-exis.patch
|
|
cd6068 |
From 0094bc09666f03b5c2ab955213dab79b19410cb7 Mon Sep 17 00:00:00 2001
|
|
|
022f11 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
022f11 |
Date: Mon, 5 Nov 2012 11:19:19 +0000
|
|
|
022f11 |
Subject: [PATCH] RHEL 7: Ignore /etc/release if /etc/redhat-release exists
|
|
|
022f11 |
(RHBZ#873219).
|
|
|
022f11 |
|
|
|
022f11 |
If the user has created /etc/release on a RHEL machine, don't
|
|
|
022f11 |
mis-detect the OS as NetBSD.
|
|
|
022f11 |
---
|
|
|
022f11 |
src/inspect-fs.c | 3 ++-
|
|
|
022f11 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
022f11 |
|
|
|
022f11 |
diff --git a/src/inspect-fs.c b/src/inspect-fs.c
|
|
|
022f11 |
index 0473e92..4ad294b 100644
|
|
|
022f11 |
--- a/src/inspect-fs.c
|
|
|
022f11 |
+++ b/src/inspect-fs.c
|
|
|
022f11 |
@@ -223,7 +223,8 @@ check_filesystem (guestfs_h *g, const char *mountable,
|
|
|
022f11 |
else if (is_dir_etc &&
|
|
|
022f11 |
is_dir_bin &&
|
|
|
022f11 |
guestfs_is_file (g, "/etc/fstab") > 0 &&
|
|
|
022f11 |
- guestfs_is_file (g, "/etc/release") > 0) {
|
|
|
022f11 |
+ guestfs_is_file (g, "/etc/release") > 0 &&
|
|
|
022f11 |
+ guestfs_is_file (g, "/etc/redhat-release") == 0) {
|
|
|
022f11 |
/* Ignore /dev/sda1 which is a shadow of the real root filesystem
|
|
|
022f11 |
* that is probably /dev/sda5 (see:
|
|
|
022f11 |
* http://www.freebsd.org/doc/handbook/disk-organization.html)
|
|
|
022f11 |
--
|
|
|
022f11 |
1.8.3.1
|
|
|
022f11 |
|