devices-local revision fa9e4066f08beec538e775443c5be79dd423fcab
20131N/A#!/sbin/sh
20131N/A#
20131N/A# CDDL HEADER START
20131N/A#
20131N/A# The contents of this file are subject to the terms of the
20131N/A# Common Development and Distribution License, Version 1.0 only
20131N/A# (the "License"). You may not use this file except in compliance
20131N/A# with the License.
20131N/A#
20131N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20131N/A# or http://www.opensolaris.org/os/licensing.
20131N/A# See the License for the specific language governing permissions
20131N/A# and limitations under the License.
20131N/A#
20131N/A# When distributing Covered Code, include this CDDL HEADER in each
20131N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20131N/A# If applicable, add the following below this CDDL HEADER, with the
20131N/A# fields enclosed by brackets "[]" replaced with your own identifying
20131N/A# information: Portions Copyright [yyyy] [name of copyright owner]
20131N/A#
20131N/A# CDDL HEADER END
20131N/A#
20131N/A#
20131N/A# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
20131N/A# Use is subject to license terms.
20131N/A#
20131N/A# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T.
20131N/A# All rights reserved.
20131N/A#
20131N/A#
20131N/A# ident "%Z%%M% %I% %E% SMI"
20131N/A
20131N/A# Initiate the device reconfiguration process in case we need some
20131N/A# device links established so that we can successfully perform our
20131N/A# remaining standard mounts.
20131N/A
20131N/Aif [ `/sbin/zonename` != "global" ]; then
20131N/A exit 0
20131N/Afi
20131N/A
20131N/A. /lib/svc/share/smf_include.sh
20131N/A
20131N/Asvcprop -q -p system/reconfigure system/svc/restarter:default
20131N/Aif [ $? -eq 0 ]; then
20131N/A echo 'Configuring devices.' > /dev/msglog 2>&1
20131N/A /usr/sbin/devfsadm >/dev/msglog 2>&1
20131N/A if [ -x /usr/ucb/ucblinks -a -f /usr/ucblib/ucblinks.awk ]; then
20131N/A /usr/ucb/ucblinks >/dev/null 2>&1
20131N/A fi
20131N/A
20131N/A #
20131N/A # Flush any existing socket mappings since the major numbers of
20131N/A # the device files may have changed.
20131N/A #
20131N/A /usr/bin/awk '/^[^#]/ { print $1, $2, $3 }' /etc/sock2path | \
20131N/A /sbin/soconfig -f /dev/fd/0 >/dev/null 2>&1
20131N/A /sbin/soconfig -f /etc/sock2path >/dev/null 2>&1
20131N/A
20131N/A #
20131N/A # Update kernel driver.conf cache.
20131N/A #
20131N/A /usr/sbin/devfsadm -I
20131N/Afi
20131N/A
20131N/A# Establish the default framebuffer name.
20131N/A
20131N/Afbdev=`/usr/sbin/prtconf -F 2>/dev/null`
20131N/A
20131N/Aif [ $? -eq 0 ]; then
20131N/A set -- /devices$fbdev*
20131N/A if [ -c $1 ]; then
20131N/A rm -f /dev/fb
20131N/A ln -s $1 /dev/fb
20131N/A fi
20131N/Afi
20131N/A
20131N/A# Create any zvol devices
20131N/Aif [ -x /usr/sbin/zfs ]; then
20131N/A /usr/sbin/zfs volinit || exit $SMF_EXIT_ERR_FATAL
20131N/Afi
20131N/A
20131N/Aexit 0
20131N/A