5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # ident "%Z%%M% %I% %E% SMI"
28 # set path, but inherit /tmp/bfubin if it is sane
30 if [ "`echo $PATH | cut -f 1 -d :`" = /tmp
/bfubin
] && \
31 [ -O /tmp
/bfubin
] ; then
32 export PATH
=/tmp
/bfubin
:/usr
/sbin
:/usr
/bin
:/sbin
34 export PATH
=/usr
/sbin
:/usr
/bin
:/sbin
38 echo "This utility is a component of the bootadm(1M) implementation"
39 echo "and it is not recommended for stand-alone use."
40 echo "Please use bootadm(1M) instead."
42 echo "Usage: ${0##*/}: [-R <root>] [-p <platform>] <filelist> ..."
43 echo "where <platform> is one of i86pc, sun4u or sun4v"
53 if [ -z "$STRIP" ] ; then
54 ls -d platform
/*/kernel
56 ls -d platform
/*/kernel |
grep -v $STRIP
61 # default platform is what we're running on
69 while getopts R
:p
: FLAG
72 R
) if [ "$OPTARG" != "/" ]; then
76 p
) platform_provided
=yes
84 shift `expr $OPTIND - 1`
92 # If the target platform is provided, as is the case for diskless,
93 # or we're building an archive for this machine, we can build
94 # a smaller archive by not including unnecessary components.
97 if [ "$altroot" == "" ] ||
[ $platform_provided = yes ]; then
103 STRIP
=platform
/sun4v
/
106 STRIP
=platform
/sun4u
/
114 for list
in $filelists
116 if [ -f $altroot/$list ]; then
117 grep ^platform$
$altroot/$list > /dev
/null
119 build_platform
$altroot
120 if [ -z "$STRIP" ] ; then
121 cat $altroot/$list |
grep -v ^platform$
123 cat $altroot/$list |
grep -v ^platform$ | \
127 if [ -z "$STRIP" ] ; then
130 cat $altroot/$list |
grep -v $STRIP