Accepting request 590430 from home:markkp:branches:Base:System
- Modified dasd_configure script to set a return code of 8 if a DASD volume being brought online is not formatted. (bsc#1084503) OBS-URL: https://build.opensuse.org/request/show/590430 OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=45
This commit is contained in:
parent
f675d71be2
commit
cedfeed3a5
@ -28,7 +28,8 @@
|
|||||||
# 1 to use z/VM DIAG250 I/O
|
# 1 to use z/VM DIAG250 I/O
|
||||||
#
|
#
|
||||||
# Return values:
|
# Return values:
|
||||||
# Return codes are determined by the chzdev command.
|
# Return codes are determined by the chzdev command, with one exception: If a
|
||||||
|
# DASD volume is not formatted, we will issue a return code of 8.
|
||||||
#
|
#
|
||||||
|
|
||||||
mesg () {
|
mesg () {
|
||||||
@ -138,9 +139,35 @@ fi
|
|||||||
RC=${?}
|
RC=${?}
|
||||||
if [ ${RC} -ne 0 ]; then
|
if [ ${RC} -ne 0 ]; then
|
||||||
exit ${RC}
|
exit ${RC}
|
||||||
|
elif [ ${ON_OFF} == 1 ]; then
|
||||||
|
exitcode=0
|
||||||
|
# Extract the full busid so that we can reference the proper entries in /sys
|
||||||
|
BUSID=$(/sbin/lszdev dasd ${CCW_CHAN_ID} | /usr/bin/sed -e 1d | /usr/bin/tr -s " " | /usr/bin/cut -f2 -d" " )
|
||||||
|
# Make sure the DASD volume came online
|
||||||
|
for ((counter=0; counter<30; counter++)); do
|
||||||
|
sleep 0.1
|
||||||
|
read online < /sys/bus/ccw/devices/${BUSID}/online
|
||||||
|
if [ ${online} -eq 1 ] ; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ${online} -ne 1 ]; then
|
||||||
|
debug_mesg "DASD ${CCW_CHAN_ID} did not come online."
|
||||||
|
exit 17
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check to see if the DASD volume is unformatted. If so, let YaST know.
|
||||||
|
read status < /sys/bus/ccw/devices/${BUSID}/status
|
||||||
|
if [ "${status}" == "unformatted" ]; then
|
||||||
|
mesg "DASD ${CCW_CHAN_ID} is unformatted."
|
||||||
|
exitcode=8
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${ON_OFF} == 1 ]; then
|
if [ ${ON_OFF} == 1 ]; then
|
||||||
add_cio_channel "${CCW_CHAN_ID}"
|
add_cio_channel "${CCW_CHAN_ID}"
|
||||||
else remove_cio_channel "${CCW_CHAN_ID}"
|
else remove_cio_channel "${CCW_CHAN_ID}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exit ${exitcode}
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 22 21:16:00 UTC 2018 - mpost@suse.com
|
||||||
|
|
||||||
|
- Modified dasd_configure script to set a return code of 8 if a
|
||||||
|
DASD volume being brought online is not formatted. (bsc#1084503)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Dec 12 01:01:09 UTC 2017 - mpost@suse.com
|
Tue Dec 12 01:01:09 UTC 2017 - mpost@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package s390-tools
|
# spec file for package s390-tools
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
Loading…
Reference in New Issue
Block a user