xref: /titanic_52/usr/src/cmd/initpkg/rc2.d/mk.rc2.d.sh (revision 8ad60789b9913d5b2118fe76d8cd7a661d8ae8b6)
1#!/sbin/sh
2#
3# CDDL HEADER START
4#
5# The contents of this file are subject to the terms of the
6# Common Development and Distribution License, Version 1.0 only
7# (the "License").  You may not use this file except in compliance
8# with the License.
9#
10# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11# or http://www.opensolaris.org/os/licensing.
12# See the License for the specific language governing permissions
13# and limitations under the License.
14#
15# When distributing Covered Code, include this CDDL HEADER in each
16# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17# If applicable, add the following below this CDDL HEADER, with the
18# fields enclosed by brackets "[]" replaced with your own identifying
19# information: Portions Copyright [yyyy] [name of copyright owner]
20#
21# CDDL HEADER END
22#
23#	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
24#	  All Rights Reserved
25
26
27#
28# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
29# Use is subject to license terms.
30#
31# ident	"%Z%%M%	%I%	%E% SMI"
32#
33
34COMMON_STARTLST="\
3520sysetup \
3670uucp \
3773cachefs.daemon \
3882mkdtab \
3998deallocate"
40
41STOPLST="27boot.server"
42
43INIT_STOPLST="07snmpdx 07dmi"
44
45INSDIR=${ROOT}/etc/rc2.d
46
47if [ ! -d ${INSDIR} ]
48then
49	mkdir ${INSDIR}
50	eval ${CH}chmod 755 ${INSDIR}
51	eval ${CH}chgrp sys ${INSDIR}
52	eval ${CH}chown root ${INSDIR}
53fi
54for f in ${STOPLST}
55do
56	name=`echo $f | sed -e 's/^..//'`
57	rm -f ${INSDIR}/K$f
58	ln ${ROOT}/etc/init.d/${name} ${INSDIR}/K$f
59done
60for f in ${INIT_STOPLST}
61do
62	name=`echo $f | sed -e 's/^..//'`
63	rm -f ${INSDIR}/K$f
64	ln ${ROOT}/etc/init.d/init.${name} ${INSDIR}/K$f
65done
66for f in ${COMMON_STARTLST}
67do
68	name=`echo $f | sed -e 's/^..//'`
69	rm -f ${INSDIR}/S$f
70	ln ${ROOT}/etc/init.d/${name} ${INSDIR}/S$f
71done
72