s390-tools/s390-tools-sles15-zdev-Enable-running-chzdev-from-unknown-root-devices.patch
Mark Post b12140c3aa Accepting request 555141 from home:markkp:branches:Base:System
- Added the following two patches (bsc#1071166):
  s390-tools-sles15-zdev-Enable-running-chzdev-from-unknown-root-devices.patch
  s390-tools-sles15-zdev-Fix-zdev-dracut-module-aborting-on-unknown-root.patch

OBS-URL: https://build.opensuse.org/request/show/555141
OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=41
2017-12-07 23:24:33 +00:00

54 lines
1.8 KiB
Diff

From 2a6a28023bdfe127be68ac605f9a026a82884c80 Mon Sep 17 00:00:00 2001
From: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Date: Tue, 5 Dec 2017 15:40:23 +0100
Subject: [PATCH 1/4] zdev: Enable running chzdev from unknown root devices
When a persistent device configuration is changed, chzdev tries to
find out if it needs to perform additional steps to make this change
persistent. If this check fails, for example because the root device
is located on a RAM-disk, or on a device type not managed by chzdev,
the tool reports an error and exits with non-zero exit code:
chzdev: Could not determine device that provides /
or
chzdev: Could not determine device that provides loop0
This behavior unnecessarily restricts chzdev from being used in
scripted environments like an installation initial RAM-disk.
Fix this by removing the non-zero exit code and moving the message to
verbose output mode only.
Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
---
zdev/src/root.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/zdev/src/root.c b/zdev/src/root.c
index 7f0d39f..668bdbd 100644
--- a/zdev/src/root.c
+++ b/zdev/src/root.c
@@ -35,9 +35,14 @@ exit_code_t root_check(void)
/* Get list of devices that provide the root device. */
selected = selected_dev_list_new();
rc = select_by_path(NULL, selected, config_active, scope_mandatory,
- NULL, NULL, PATH_ROOT, err_print);
- if (rc)
+ NULL, NULL, PATH_ROOT, err_ignore);
+ if (rc) {
+ /* Running from an unknown root device is not an error. */
+ verb("Note: Could not determine if root device configuration "
+ "needs to be updated\n");
+ rc = 0;
goto out;
+ }
/* Determine if any of the devices or device types has been modified. */
mod = strlist_new();
--
2.13.6