devices-local revision 3c286aed330e80c88b5be17cd69f40d4ccb25002
2605N/A#!/sbin/sh
2605N/A#
2605N/A# CDDL HEADER START
2605N/A#
2605N/A# The contents of this file are subject to the terms of the
2605N/A# Common Development and Distribution License (the "License").
2605N/A# You may not use this file except in compliance with the License.
2605N/A#
2605N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2605N/A# or http://www.opensolaris.org/os/licensing.
2605N/A# See the License for the specific language governing permissions
2605N/A# and limitations under the License.
2605N/A#
2605N/A# When distributing Covered Code, include this CDDL HEADER in each
2605N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2605N/A# If applicable, add the following below this CDDL HEADER, with the
2605N/A# fields enclosed by brackets "[]" replaced with your own identifying
2605N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2605N/A#
2605N/A# CDDL HEADER END
2605N/A#
2605N/A#
2605N/A# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
2605N/A#
2605N/A# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T.
2605N/A# All rights reserved.
2605N/A#
2900N/A
2900N/A# Initiate the device reconfiguration process in case we need some
2605N/A# device links established so that we can successfully perform our
2605N/A# remaining standard mounts.
2605N/A
2900N/A. /lib/svc/share/smf_include.sh
2605N/A
2605N/Asmf_is_globalzone || exit $SMF_EXIT_OK
2605N/A
2605N/Asvcprop -q -p system/reconfigure system/svc/restarter:default
2605N/Aif [ $? -eq 0 ]; then
3661N/A echo 'Configuring devices.' > /dev/msglog 2>&1
3661N/A /usr/sbin/devfsadm >/dev/msglog 2>&1
2605N/A
2605N/A #
2605N/A # Rerun soconfig to configure any sockets that use /dev
2605N/A # entries that were just created by devfsadm.
2605N/A #
2605N/A /sbin/soconfig -f /etc/sock2path >/dev/null 2>&1
2605N/A
2605N/A #
2605N/A # Update kernel driver.conf cache.
2605N/A #
2605N/A /usr/sbin/devfsadm -I
2605N/Afi
2605N/A
2605N/A# Establish the default framebuffer name.
2605N/A
2605N/Afbdev=`/usr/sbin/prtconf -F 2>/dev/null`
2605N/A
2605N/Aif [ $? -eq 0 ]; then
2605N/A set -- /devices$fbdev*
2605N/A if [ -c $1 ]; then
2605N/A if [ -h /dev/fb ]; then
2605N/A fblink=`ls -l /dev/fb | /usr/bin/awk '{ print $11 }'`
if [ "$1" != "$fblink" ]; then
rm -f /dev/fb
ln -s $1 /dev/fb
fi
else
rm -f /dev/fb
ln -s $1 /dev/fb
fi
fi
fi
exit $SMF_EXIT_OK