i.qlc revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#ident "@(#)i.qlc 1.7 08/01/07 SMI"
#
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
sun_copyright1='# Copyright 2006 Sun Microsystems, Inc. All rights reserved.'
sun_copyright2='# Use is subject to license terms.'
# Update Copyright and Ident information in Destination
{
sed \
-e "/#ident/y/\~/\"/" \
if [ $? -eq 0 ] ; then
fi
}
# Reset default value for pci-max-read-request
{
if [ $? -eq 0 ] ; then
fi
}
# Assemble sed script to remove comments
{
# Comment block 1
/# Sun StorEdge Traffic Manager Software (mpxio)/{
N
N
N
N
/# Multipath I\/O feature through this configuration file/d
}
# Comment block 2
/# Example 1: To disable mpxio for a port on a single ported HBA/{
N
N
N
N
/# name="qlc" parent="\/pci@6,2000" unit-address="2" mpxio-disable="yes"/d
}
# Comment block 3
/^# Example 2: To disable mpxio for a port on a dual ported HBA/{
N
N
N
N
/# name="qlc" parent="\/pci@13,2000\/pci@2" unit-address="5" mpxio-disable/d
}
# Old pci-max-read-request comment
/^#Name: PCI max read request override;/{
N
N
N
N
N
N
N
/#pci-max-read-request=2048;/d
}
SEDCMDS
}
# Remove outdated comment information
{
if [ $? -eq 0 ] ; then
fi
}
# Update incompatible parameters to new settings
{
if [ $? -ne 0 ] ; then
return
fi
# Entry does not exist use default for adapter-hard-loop-ID
loopid=0
fi
}
# Add new paramaters from Source and their comments to Destination,
# if not present. Comments will not be added if parameters exists
# in Destination
{
parameter=""
while read confline
do
if [ $? -eq 0 ] ; then
# Comment.
# Start new block or append to existing block.
if [ -z "${param_comment}" ] ; then
param_comment="${confline}"
else
param_comment="${param_comment}\n${confline}"
fi
continue
fi
# Blank line or no parameter; reset values
parameter=""
continue
fi
# Must be an assigned parameter
# Check if parameter exist in file
if [ $? -ne 0 ] ; then
# Append leading comment and assigned parameter.
echo >> $dest
fi
# Reset for next parameter
parameter=""
done < $src
}
# Assemble sed script to change data rate comments
{
# Look for data rate comments
/#Name: Fibre Channel Data Rate Option/{
n
s/Range: .-./Range: 0-4/
n
n
n
n
n
/^#Usage/i\\
# 4 = 8 gigabit/second
}
SEDCMDS
}
{
if [ $? -eq 0 ] ; then
fi
}
#
# Main --------------------
#
do
if [ ! -f $dest ] ; then
else
# Upgrade destination file
fi
done
exit 0