b60bd99df6
* s390-tools-slfo-01-parse-ipl-device-for-activation.patch - Removed the old 'initial' patch * s390-tools-sles15sp6-01-parse-ipl-device-for-activation.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=217
21 lines
418 B
Bash
21 lines
418 B
Bash
#!/bin/bash
|
|
# checks DASD accessibility in VM and sets Linux-side readonly attributes
|
|
# accordingly
|
|
|
|
modprobe -q vmcp
|
|
|
|
vmcp q v dasd 2>/dev/null >/dev/null || exit 0 # not running in VM
|
|
|
|
vmcp q v dasd | while read x dev rest
|
|
do
|
|
dev=`echo $dev|tr A-F a-f`
|
|
roattr=/sys/bus/ccw/devices/?.?.$dev/readonly
|
|
test -e $roattr || continue
|
|
if echo "$rest"|grep -q R/O
|
|
then
|
|
echo 1 >$roattr
|
|
else
|
|
echo 0 >$roattr
|
|
fi
|
|
done
|