ypstart.sh (0:68f95e015346) ypstart.sh (1573:7338e65f2666)
1#!/bin/sh
2#
3# CDDL HEADER START
4#
5# The contents of this file are subject to the terms of the
1#!/bin/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.
6# Common Development and Distribution License (the "License").
7# You may not use this file except in compliance 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#
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#
24# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
23# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
25# Use is subject to license terms.
26#
27# ident "%Z%%M% %I% %E% SMI"
28#
29# Enable appropriate NIS daemons based on the current configuration.
30
31enable () {
32 /usr/sbin/svcadm enable -t $1

--- 9 unchanged lines hidden (view full) ---

42if [ -z "$domain" ]; then
43 echo "ERROR: Default domain is not defined. \c"
44 echo "Use \"domainname\" to set the domain."
45 exit 1
46fi
47
48echo "starting NIS (YP server) services:\c"
49
24# Use is subject to license terms.
25#
26# ident "%Z%%M% %I% %E% SMI"
27#
28# Enable appropriate NIS daemons based on the current configuration.
29
30enable () {
31 /usr/sbin/svcadm enable -t $1

--- 9 unchanged lines hidden (view full) ---

41if [ -z "$domain" ]; then
42 echo "ERROR: Default domain is not defined. \c"
43 echo "Use \"domainname\" to set the domain."
44 exit 1
45fi
46
47echo "starting NIS (YP server) services:\c"
48
50zone=`/usr/bin/zonename`
49zone=`/sbin/zonename`
51
52if [ -d /var/yp/$domain ]; then
53 state=`/usr/bin/svcprop -p restarter/state network/nis/server:default`
54
55 [ "$state" = "disabled" ] && if [ -n "`pgrep -z $zone ypserv`" ]; then
56 echo "ypstart: ypserv already running?"
57 fi
58

--- 50 unchanged lines hidden ---
50
51if [ -d /var/yp/$domain ]; then
52 state=`/usr/bin/svcprop -p restarter/state network/nis/server:default`
53
54 [ "$state" = "disabled" ] && if [ -n "`pgrep -z $zone ypserv`" ]; then
55 echo "ypstart: ypserv already running?"
56 fi
57

--- 50 unchanged lines hidden ---