postinstall revision eae72b5b807baa9116e64502cbb278edf15f3146
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews# CDDL HEADER START
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# The contents of this file are subject to the terms of the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Common Development and Distribution License (the "License").
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You may not use this file except in compliance with the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# See the License for the specific language governing permissions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and limitations under the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# When distributing Covered Code, include this CDDL HEADER in each
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# If applicable, add the following below this CDDL HEADER, with the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# fields enclosed by brackets "[]" replaced with your own identifying
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# information: Portions Copyright [yyyy] [name of copyright owner]
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# CDDL HEADER END
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Use is subject to license terms.
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# SUNWcsd postinstall configuration
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# This file supplies /dev links needed in the install miniroot. The link
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# targets are automatically created by devfs as driver attaches.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The prototype_com, prototype_sparc, and prototype_i386 variables defined
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# below each consist of two whitespace-delimited columns, defined as follows:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# 1. Device Path - Relative (should NOT begin with /) path to the device file
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# to be created. This base is interpreted relative to $BASEDIR (typically /a).
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# 2. Symbolic Link - The symlink to the device path which should be created.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# The link should be a relative path to which $BASEDIR can be prepended.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Common driver entries:
9b3ef7211c28f97f5ecb507d2e2d474397238b44Tinderbox Userdevices/pseudo/ipsecesp@0:ipsecesp dev/ipsecesp
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# SPARC-specific driver entries:
3ba1f79ade054aa6a0dc5032502bcdcf357cd7bdTinderbox User# Intel-specific driver entries:
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# SUNWcsd postinstall implementation
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Below this point is the code to process the above $prototype_* maps.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# You should not need to modify any code below this point to configure
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# new drivers. You should also not need to add code here to remove
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# links created by a previous version of this package. All the links
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# can also be created by devfsadm link generators; the reason they
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# are also here is for the initial boot (miniroot or diskless client)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# where certain devices must be present to get to the point when
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# devfsadm runs.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Determine an appropriate place for our private error log file. If $PKGSAV
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# is available, use that; otherwise use /tmp or /dev/null. We keep a private
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# error log primarily as a debugging facility.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntfor file in $PKGSAV/SUNWcsd.err /tmp/SUNWcsd.err; do
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunteval echo "\"\$prototype_com\"" "\"\$prototype_${ARCH}\"" | \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User [ -z "$path" ] && continue # Skip blank lines
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt # The link destination must be specified as an absolute path
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt # to installf. The source we modify to be relative to the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt # destination (each "/" becomes a "../" prefix); thus
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt # linkdst "dev/foo/bar" yields prefix "../../".
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User lprefix=`echo "$symlink" | sed 's:[^/]*::g;s:/:../:g'`
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt echo "add link $linkdst=$linksrc"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCopyright 2002 Sun Microsystems, Inc. All rights reserved.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntUse is subject to license terms.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt This installation of Solaris uses devfs to provide /devices.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntWarning: Do not change the content of this directory or its
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt subdirectories.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User The directory containing this README file is typically hidden
9d557856c2a19ec95ee73245f60a92f8675cf5baTinderbox Userunderneath the /devices devfs(7FS) mount point. All content at or
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntbelow this directory is an implementation artifact and subject to
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntincompatible change or removal without notification.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt Please reference devfs(7FS) for more information.