devices-local revision 681d9761e8516a7dc5ab6589e2dfe717777e1123
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj#!/sbin/sh
e636eba7474e0010b5c7198af1c2fe5ad8652dbbmanoj#
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# CDDL HEADER START
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj#
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# The contents of this file are subject to the terms of the
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein# Common Development and Distribution License (the "License").
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein# You may not use this file except in compliance with the License.
35330e0d79ceb8027223bbb8330a381b1f989d6etrawick#
6f6f4a4bca281779d196acbdd5c017bb90858305trawick# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8dd4618c4709236b4ea297d7250d282e463ce2d8rbb# or http://www.opensolaris.org/os/licensing.
09bd86d0db1114ee23eda0a6eb76ca055877a1cftrawick# See the License for the specific language governing permissions
2deb319e6b3de239f45c16a3e9e836d44f1f7108rbb# and limitations under the License.
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb#
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanoj# When distributing Covered Code, include this CDDL HEADER in each
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# If applicable, add the following below this CDDL HEADER, with the
1bed1439cc86cac95cdbd16a0342e3b5362f7d0crbb# fields enclosed by brackets "[]" replaced with your own identifying
1bed1439cc86cac95cdbd16a0342e3b5362f7d0crbb# information: Portions Copyright [yyyy] [name of copyright owner]
1bed1439cc86cac95cdbd16a0342e3b5362f7d0crbb#
1bed1439cc86cac95cdbd16a0342e3b5362f7d0crbb# CDDL HEADER END
1bed1439cc86cac95cdbd16a0342e3b5362f7d0crbb#
4a81c8eb2a61b43a9dd0879a65feb834a6dde1d5stoddard#
447c6ce3ff08073c44f6785d5256271fcb877512wrowe# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
447c6ce3ff08073c44f6785d5256271fcb877512wrowe# Use is subject to license terms.
447c6ce3ff08073c44f6785d5256271fcb877512wrowe#
447c6ce3ff08073c44f6785d5256271fcb877512wrowe# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T.
73cbcafbe4c5ce51e6ba8043d33235fde09b6e94trawick# All rights reserved.
73cbcafbe4c5ce51e6ba8043d33235fde09b6e94trawick#
73cbcafbe4c5ce51e6ba8043d33235fde09b6e94trawick
bfb62a96023822c56c9120e4ee627d4091cc59c2rbb# Initiate the device reconfiguration process in case we need some
85cbdc16ac57fa68ce1358a308269abcd417f4d9stoddard# device links established so that we can successfully perform our
85cbdc16ac57fa68ce1358a308269abcd417f4d9stoddard# remaining standard mounts.
85cbdc16ac57fa68ce1358a308269abcd417f4d9stoddard
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddard. /lib/svc/share/smf_include.sh
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddard
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddardsmf_is_globalzone || exit $SMF_EXIT_OK
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddard
10b386767f6c87b45937244371cb751f0b454d16wrowesvcprop -q -p system/reconfigure system/svc/restarter:default
10b386767f6c87b45937244371cb751f0b454d16wroweif [ $? -eq 0 ]; then
863ec32e13d6c9619414c48b51109f3dca99cbc6wrowe echo 'Configuring devices.' > /dev/msglog 2>&1
863ec32e13d6c9619414c48b51109f3dca99cbc6wrowe /usr/sbin/devfsadm >/dev/msglog 2>&1
75960f20f88dad6bc67892c711c429946063d133stoddard
75960f20f88dad6bc67892c711c429946063d133stoddard #
75960f20f88dad6bc67892c711c429946063d133stoddard # Flush any existing socket mappings since the major numbers of
75960f20f88dad6bc67892c711c429946063d133stoddard # the device files may have changed.
75960f20f88dad6bc67892c711c429946063d133stoddard #
75960f20f88dad6bc67892c711c429946063d133stoddard /usr/bin/awk '/^[^#]/ { print $1, $2, $3 }' /etc/sock2path | \
75960f20f88dad6bc67892c711c429946063d133stoddard /sbin/soconfig -f /dev/fd/0 >/dev/null 2>&1
10b386767f6c87b45937244371cb751f0b454d16wrowe /sbin/soconfig -f /etc/sock2path >/dev/null 2>&1
10b386767f6c87b45937244371cb751f0b454d16wrowe
10b386767f6c87b45937244371cb751f0b454d16wrowe #
10b386767f6c87b45937244371cb751f0b454d16wrowe # Update kernel driver.conf cache.
10b386767f6c87b45937244371cb751f0b454d16wrowe #
10b386767f6c87b45937244371cb751f0b454d16wrowe /usr/sbin/devfsadm -I
10b386767f6c87b45937244371cb751f0b454d16wrowefi
10b386767f6c87b45937244371cb751f0b454d16wrowe
a9e07e4f90adcc7bc768db3055431c3dcd560cd1manoj# Establish the default framebuffer name.
f6a6245816cd866361da8c576b1f47c7a54b6610fanf
f6a6245816cd866361da8c576b1f47c7a54b6610fanffbdev=`/usr/sbin/prtconf -F 2>/dev/null`
97b758d0b174d7b7c5a1de1a583f5840ec3fc910trawick
db3ccce11afac4fc1d4f51a65424412f7480c46cgsteinif [ $? -eq 0 ]; then
641cb23141f2238ed09e3b9fa79189225f8a2bcbrbb set -- /devices$fbdev*
641cb23141f2238ed09e3b9fa79189225f8a2bcbrbb if [ -c $1 ]; then
641cb23141f2238ed09e3b9fa79189225f8a2bcbrbb if [ -h /dev/fb ]; then
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick fblink=`ls -l /dev/fb | /usr/bin/awk '{ print $11 }'`
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick if [ "$1" != "$fblink" ]; then
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick rm -f /dev/fb
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick ln -s $1 /dev/fb
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick fi
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj else
b187d568e1507d75139ebc13ca945b38fc05d55cstoddard rm -f /dev/fb
b187d568e1507d75139ebc13ca945b38fc05d55cstoddard ln -s $1 /dev/fb
b187d568e1507d75139ebc13ca945b38fc05d55cstoddard fi
1c6fb1e726ce22694de0e9a957adb67b929e5d4fstoddard fi
1c6fb1e726ce22694de0e9a957adb67b929e5d4fstoddardfi
1c6fb1e726ce22694de0e9a957adb67b929e5d4fstoddard
1c6fb1e726ce22694de0e9a957adb67b929e5d4fstoddardexit $SMF_EXIT_OK
1c6fb1e726ce22694de0e9a957adb67b929e5d4fstoddard