i.ibnexconf revision cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0
#
# 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
#
#
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
#
# The IB Nexus driver (ib(7d)), requires the following lines :
# name="ib" class="root";
#
# This script adds the required line and relevant comments,
# if the lines are not already present in the ib.conf file.
#
#
# Search for the line containing
# name="ib" class="root";
# in ib.conf file. This returns 0 on a successful search.
#
{
return $search_result
}
#
# Update ib.conf just adds the line containing :
# name="ib" class="root";
# and the adjoining comments in target ib.conf file.
#
{
echo $IB_STR1 >> $TGT_IBCONFFILE
echo $IB_STR2 >> $TGT_IBCONFFILE
echo $IB_STR3 >> $TGT_IBCONFFILE
}
#
# Search Pattern and additional lines for ib.conf
#
IB_STR1="# The name and class property are required to indicate that IB nexus"
IB_STR2="# driver is a child of the root nexus driver. DO NOT DELETE LINE BELOW"
IB_STR3="name=\"ib\" class=\"root\";"
IB_SEARCH_STRING="^[ ]*name=\"ib\"[ ]*class=\"root\"[ ]*;"
if [ -f $dest ]; then
#
# 1. Search the $dest file for relevant line
# 2. If search fails, add the required lines to $dest
#
fi
else
#
# If no ib.conf file is present on the target system,
# just copy over the one from the package.
#
fi
done
exit 0