xref: /illumos-gate/usr/src/cmd/svc/milestone/devices-audio (revision 88447a05f537aabe9a1bc3d5313f22581ec992a7)
1*88447a05SGarrett D'Amore#!/sbin/sh
2*88447a05SGarrett D'Amore#
3*88447a05SGarrett D'Amore# CDDL HEADER START
4*88447a05SGarrett D'Amore#
5*88447a05SGarrett D'Amore# The contents of this file are subject to the terms of the
6*88447a05SGarrett D'Amore# Common Development and Distribution License (the "License").
7*88447a05SGarrett D'Amore# You may not use this file except in compliance with the License.
8*88447a05SGarrett D'Amore#
9*88447a05SGarrett D'Amore# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*88447a05SGarrett D'Amore# or http://www.opensolaris.org/os/licensing.
11*88447a05SGarrett D'Amore# See the License for the specific language governing permissions
12*88447a05SGarrett D'Amore# and limitations under the License.
13*88447a05SGarrett D'Amore#
14*88447a05SGarrett D'Amore# When distributing Covered Code, include this CDDL HEADER in each
15*88447a05SGarrett D'Amore# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*88447a05SGarrett D'Amore# If applicable, add the following below this CDDL HEADER, with the
17*88447a05SGarrett D'Amore# fields enclosed by brackets "[]" replaced with your own identifying
18*88447a05SGarrett D'Amore# information: Portions Copyright [yyyy] [name of copyright owner]
19*88447a05SGarrett D'Amore#
20*88447a05SGarrett D'Amore# CDDL HEADER END
21*88447a05SGarrett D'Amore#
22*88447a05SGarrett D'Amore#
23*88447a05SGarrett D'Amore# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24*88447a05SGarrett D'Amore# Use is subject to license terms.
25*88447a05SGarrett D'Amore#
26*88447a05SGarrett D'Amore
27*88447a05SGarrett D'Amore. /lib/svc/share/smf_include.sh
28*88447a05SGarrett D'Amore
29*88447a05SGarrett D'Amoresmf_is_globalzone || exit $SMF_EXIT_OK
30*88447a05SGarrett D'Amore
31*88447a05SGarrett D'Amore#
32*88447a05SGarrett D'Amore# In order to populate the initial startup mapping of devfs links to
33*88447a05SGarrett D'Amore# the audio subsystem (necessary to properly report numbers in
34*88447a05SGarrett D'Amore# /dev/sndstat and in the OSS sysinfo ioctls -- thank you Linux!) we
35*88447a05SGarrett D'Amore# need to run some code at boot.  We key this off of the handler in
36*88447a05SGarrett D'Amore# devfsadm for the audio node(s).
37*88447a05SGarrett D'Amore#
38*88447a05SGarrett D'Amore# Additionally, we need to make sure the streams audio module is
39*88447a05SGarrett D'Amore# loaded so that the symbolic links are properly created for STREAMs
40*88447a05SGarrett D'Amore# devices and point to a reasonable device node.
41*88447a05SGarrett D'Amore#
42*88447a05SGarrett D'Amore/usr/sbin/devfsadm -i audio
43*88447a05SGarrett D'Amore/usr/sbin/devfsadm -i austr
44*88447a05SGarrett D'Amoreexit $SMF_EXIT_OK
45