SHA256
1
0
forked from pool/s390-tools
s390-tools/dasdro
Nikolay Gueorguiev e0449582f8 - Amended the *_configure scripts to update again the SUSE's specific file
'/boot/zipl/active_devices.txt' (bsc#1232474, bsc#1216257)
  * ctc_configure
  * dasd_configure
  * qeth_configure
  * zfcp_host_configure

OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=228
2024-11-05 08:08:43 +00:00

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