-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zdev/dracut: add rd.zfcp cmdline option handling
Add parsing of dracut cmdline option "rd.zfcp=..." at initrd runtime. It delegates configuration to chzdev. Implement `dracut --print-cmdline` and `dracut --hostonly-cmdline` for initrd build time. Emit an rd.zfcp option for each zfcp-attached SCSI disk in dracut's device dependency graph (to mount the root-fs, or to access the kdump target). This allows a distribution independent device configuration. Configuration is consistent by using chzdev as backend. It also prevents duplicate activations of the same device. Along with the existing functionality of zdev/dracut, it makes the following dracut modules superfluous: https://github.com/dracutdevs/dracut/tree/master/modules.d/95zfcp [rd.zfcp.conf is no longer needed and thus ignored here; the preceding ("zdev/dracut: fix marking hostonly files so delete option works") makes rd.hostonly=0 work as a generic replacement] https://github.com/dracutdevs/dracut/tree/master/modules.d/95zfcp_rules Github-ID: #158 Acked-by: Vineeth Vijayan <vneethv@linux.ibm.com> Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Steffen Maier <maier@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
- Loading branch information
1 parent
ed106d7
commit 06a30ae
Showing
5 changed files
with
169 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright IBM Corp. 2023 | ||
# | ||
# s390-tools is free software; you can redistribute it and/or modify | ||
# it under the terms of the MIT license. See LICENSE for details. | ||
# | ||
# 95zdev/parse-zfcp.sh | ||
# Parse the command line for rd.zfcp parameters. These | ||
# parameters are evaluated and used to configure zfcp devices. | ||
# | ||
|
||
zdev_zfcp_base_args="--no-settle --yes --quiet --no-root-update --force" | ||
|
||
for zdev_zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do | ||
( | ||
IFS_SAVED="$IFS" | ||
IFS="," # did not work in front of built-in set command below | ||
# shellcheck disable=SC2086 | ||
set -- $zdev_zfcp_arg | ||
IFS=":" args="$*" | ||
IFS="$IFS_SAVED" | ||
if [ "$#" -eq 1 ]; then | ||
# shellcheck disable=SC2086 | ||
chzdev --enable --persistent $zdev_zfcp_base_args \ | ||
zfcp-host "$args" | ||
else | ||
# shellcheck disable=SC2086 | ||
chzdev --enable --persistent $zdev_zfcp_base_args \ | ||
zfcp-lun "$args" | ||
fi | ||
) | ||
done | ||
unset zdev_zfcp_arg | ||
unset zdev_zfcp_base_args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters