mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdev/dracut: fix to not depend on existing chzdev persistent config
Dracut knows exactly what dependencies it needs. Do not break it by
accidentally missing parts in the chzdev persistent configuration
(/etc/udev/rules.d/41-*.rules). Depicted as mathematical sets:
+-------------------------------+
| active |
| +---------------------------------+
| | | persistent |
| +------------------------------------+ |
| | root / kdump dependencies | |
| | was | | | |
| | missing| zdev so far | DR | |
| +------------------------------------+ |
| | | |
+-------------------------------+ |
| |
+---------------------------------+
Github-ID: https://github.com/ibm-s390-linux/s390-tools/pull/158
Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
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>
This commit is contained in:
committed by
Jan Höppner
parent
d96767ee45
commit
7e8126704b
@@ -30,6 +30,7 @@ check() {
|
||||
|
||||
# Ensure that required tools are available
|
||||
require_binaries chzdev lszdev /lib/s390-tools/zdev_id || return 1
|
||||
require_binaries sed || return 1
|
||||
|
||||
return 0
|
||||
}
|
||||
@@ -75,10 +76,13 @@ install() {
|
||||
cd -P /sys/dev/block/"$_dev" && echo "$PWD"
|
||||
)
|
||||
_bdevpath=/dev/${_devsysfs##*/}
|
||||
chzdev --export - --persistent --by-node "$_bdevpath" --quiet \
|
||||
--type 2>/dev/null >> "$_tempfile"
|
||||
chzdev --export - --active --by-node "$_bdevpath" --quiet \
|
||||
2>/dev/null >> "$_tempfile"
|
||||
#--type # needs a change in chzdev to not have subsequent
|
||||
# import bail out on unknown type properties
|
||||
}
|
||||
for_each_host_dev_and_slaves_all check_zdev
|
||||
sed -i -e 's/^\[active /\[persistent /' "$_tempfile"
|
||||
|
||||
chzdev --export - --persistent --by-attrib "zdev:early=1" --quiet \
|
||||
--type 2>/dev/null >> "$_tempfile"
|
||||
|
||||
Reference in New Issue
Block a user