summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2010-07-20 09:46:18 -1000
committerDavid Cantrell <dcantrell@redhat.com>2010-07-21 04:44:58 -1000
commit98f944e66f15e972e6702341c9c211048fa4cbd7 (patch)
treee051ea5c730ad9d89a7dca4ad3a3f9d569450399 /loader
parent75b055843e990573fb4bd6b4dca1ec49fbefd026 (diff)
downloadanaconda-98f944e66f15e972e6702341c9c211048fa4cbd7.tar.gz
anaconda-98f944e66f15e972e6702341c9c211048fa4cbd7.tar.xz
anaconda-98f944e66f15e972e6702341c9c211048fa4cbd7.zip
Only write changed DASD attributes to rd_DASD params (#606783)
Only include option values in the rd_DASD parameter if the user has changed the value. This should reduce the amount of data written to zipl.conf by a reasonable amount, which should keep most use cases from exceeding the boot parameter length limit.
Diffstat (limited to 'loader')
-rw-r--r--loader/linuxrc.s3904
1 files changed, 4 insertions, 0 deletions
diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
index 1fdc0c361..c272e5b21 100644
--- a/loader/linuxrc.s390
+++ b/loader/linuxrc.s390
@@ -2522,9 +2522,11 @@ function parse_dasd() {
# now apply $attrs and set DASDs $lo to $hi online
[ -z "$hi" ] && hi=$lo
local devno lodevno=$((0x${lo##*.})) hidevno=$((0x${hi##*.}))
+ local dasdconf="/etc/dasd.conf"
for ((devno=$lodevno; $devno <= $hidevno; ++devno)); do
local devbusid=$(printf "%s.%04x" ${lo%.*} $devno)
local sys="/sys/bus/ccw/devices/"$devbusid
+ echo -n "$devbusid" >> $dasdconf
for attr in $attrs; do
if [ "$attr" = "use_diag" ]; then
# diag discipline cannot be auto-loaded
@@ -2537,6 +2539,7 @@ function parse_dasd() {
if ! sysecho $sys/$attr 1; then
echo $"Could not set attribute $attr for DASD $devbusid"
fi
+ echo -n " $attr=1" >> $dasdconf
done
if [ ! -f $sys/online ]; then
echo $"DASD $devbusid not found"
@@ -2545,6 +2548,7 @@ function parse_dasd() {
if ! sysecho $sys/online 1; then
echo $"Could not set DASD $devbusid online"
fi
+ echo >> $dasdconf
done
;;
esac