3 # CDDL HEADER START
4 #
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
8 #
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
13 #
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 #
20 # CDDL HEADER END
21 #
22 #
23 # Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 #
26 # Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T.
27 # All rights reserved.
28 #
29 #
30 # ident "%Z%%M% %I% %E% SMI"
31
32 # Initiate the device reconfiguration process in case we need some
33 # device links established so that we can successfully perform our
34 # remaining standard mounts.
35
36 . /lib/svc/share/smf_include.sh
37
38 smf_is_globalzone || exit $SMF_EXIT_OK
39
40 svcprop -q -p system/reconfigure system/svc/restarter:default
41 if [ $? -eq 0 ]; then
42 echo 'Configuring devices.' > /dev/msglog 2>&1
43 /usr/sbin/devfsadm >/dev/msglog 2>&1
44 if [ -x /usr/ucb/ucblinks -a -f /usr/ucblib/ucblinks.awk ]; then
45 /usr/ucb/ucblinks >/dev/null 2>&1
46 fi
47
48 #
49 # Flush any existing socket mappings since the major numbers of
50 # the device files may have changed.
65
66 if [ $? -eq 0 ]; then
67 set -- /devices$fbdev*
68 if [ -c $1 ]; then
69 if [ -h /dev/fb ]; then
70 fblink=`ls -l /dev/fb | /usr/bin/awk '{ print $11 }'`
71
72 if [ "$1" != "$fblink" ]; then
73 rm -f /dev/fb
74 ln -s $1 /dev/fb
75 fi
76 else
77 rm -f /dev/fb
78 ln -s $1 /dev/fb
79 fi
80 fi
81 fi
82
83 # Create any zvol devices
84 if [ -x /usr/sbin/zfs ]; then
85 /usr/sbin/zfs volinit || exit $SMF_EXIT_ERR_FATAL
86 #
87 # Add swap again to allow for swapping to zvols.
88 #
89 /sbin/swapadd
90 fi
91
92 exit $SMF_EXIT_OK
|
3 # CDDL HEADER START
4 #
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
8 #
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
13 #
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 #
20 # CDDL HEADER END
21 #
22 #
23 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 #
26 # Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T.
27 # All rights reserved.
28 #
29
30 # Initiate the device reconfiguration process in case we need some
31 # device links established so that we can successfully perform our
32 # remaining standard mounts.
33
34 . /lib/svc/share/smf_include.sh
35
36 smf_is_globalzone || exit $SMF_EXIT_OK
37
38 svcprop -q -p system/reconfigure system/svc/restarter:default
39 if [ $? -eq 0 ]; then
40 echo 'Configuring devices.' > /dev/msglog 2>&1
41 /usr/sbin/devfsadm >/dev/msglog 2>&1
42 if [ -x /usr/ucb/ucblinks -a -f /usr/ucblib/ucblinks.awk ]; then
43 /usr/ucb/ucblinks >/dev/null 2>&1
44 fi
45
46 #
47 # Flush any existing socket mappings since the major numbers of
48 # the device files may have changed.
63
64 if [ $? -eq 0 ]; then
65 set -- /devices$fbdev*
66 if [ -c $1 ]; then
67 if [ -h /dev/fb ]; then
68 fblink=`ls -l /dev/fb | /usr/bin/awk '{ print $11 }'`
69
70 if [ "$1" != "$fblink" ]; then
71 rm -f /dev/fb
72 ln -s $1 /dev/fb
73 fi
74 else
75 rm -f /dev/fb
76 ln -s $1 /dev/fb
77 fi
78 fi
79 fi
80
81 # Create any zvol devices
82 if [ -x /usr/sbin/zfs ]; then
83 /usr/sbin/zpool key -l -a
84 /usr/sbin/zfs volinit || exit $SMF_EXIT_ERR_FATAL
85 #
86 # Add swap again to allow for swapping to zvols.
87 #
88 /sbin/swapadd
89 fi
90
91 exit $SMF_EXIT_OK
|