Print this page
4743 Fix deprecated /usr/j2se usage in slp and remove from filesystem(5) manpage
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/cmd-inet/usr.lib/slpd/slp
+++ new/usr/src/cmd/cmd-inet/usr.lib/slpd/slp
1 1 #!/sbin/sh
2 2 #
3 3 # CDDL HEADER START
4 4 #
5 5 # The contents of this file are subject to the terms of the
6 6 # Common Development and Distribution License (the "License").
7 7 # You may not use this file except in compliance with the License.
8 8 #
9 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 # or http://www.opensolaris.org/os/licensing.
11 11 # See the License for the specific language governing permissions
12 12 # and limitations under the License.
13 13 #
14 14 # When distributing Covered Code, include this CDDL HEADER in each
15 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 # If applicable, add the following below this CDDL HEADER, with the
17 17 # fields enclosed by brackets "[]" replaced with your own identifying
18 18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 19 #
20 20 # CDDL HEADER END
21 21 #
22 22 #
23 23 # Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 26 #ident "%Z%%M% %I% %E% SMI"
27 27 #
↓ open down ↓ |
27 lines elided |
↑ open up ↑ |
28 28 # Service Method Support Script for the SLP service
29 29 #
30 30 # - operates a proxy for slpd which brings up the JVM to run slpd
31 31 # when required by a client; this prevents keeping JVM's alive
32 32 # when the service is not in use.
33 33 #
34 34
35 35 . /lib/svc/share/smf_include.sh
36 36
37 37 CONF=/etc/inet/slp.conf
38 -JAVA_BIN=/usr/j2se/bin/java
38 +JAVA_BIN=/usr/java/bin/java
39 39 CLASSPATH=/usr/share/lib/slp/slpd.jar
40 40 MAIN_CLASS=com.sun.slp.slpd
41 41 SLPD_HOME=/usr/lib/inet
42 42 SLPD=slpd
43 43 SLPD_BIN=$SLPD_HOME/$SLPD
44 44
45 45 case "$1" in
46 46 'start')
47 47 # Start slpd proxy (as a fragile dependency, conf file must exist)
48 48 $SLPD_BIN -f $CONF >/dev/msglog 2>&1 &
49 49 ;;
50 50
51 51 'stop')
52 52 # Kill the slpd proxy.
53 53 /usr/bin/pkill -x -u 0 -P 1 -z `smf_zonename` $SLPD
54 54
55 55 # If a configuration file exists signal a shutdown to the real slpd.
56 56 [ -f $CONF ] && {
57 57 $JAVA_BIN -classpath $CLASSPATH \
58 58 $MAIN_CLASS stop -f $CONF >/dev/msglog 2>&1 &
59 59
60 60 # Give the above slpd instance a chance to signal
61 61 # a shutdown to the real slpd instance. If after
62 62 # this time it has hung kill it.
63 63 sleep 5
64 64
65 65 # The pattern must not exceed 80 chars!
66 66 /usr/bin/pkill -x -f -u 0 -P 1,$$ -z `smf_zonename` \
67 67 "${JAVA_BIN}.*-classpath ${CLASSPATH} .*"
68 68 }
69 69
70 70 # Kill the slpd proxy service contract
71 71 smf_kill_contract $2 TERM 1
72 72 [ $? -ne 0 ] && exit 1
73 73 ;;
74 74 *)
75 75 echo "Usage: $0 { start | stop }"
76 76 exit 1
77 77 ;;
78 78 esac
79 79 exit 0
↓ open down ↓ |
31 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX