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