equal
deleted
inserted
replaced
|
1 #! /bin/ksh93 |
|
2 |
|
3 # |
|
4 # CDDL HEADER START |
|
5 # |
|
6 # The contents of this file are subject to the terms of the |
|
7 # Common Development and Distribution License (the "License"). |
|
8 # 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 |
|
24 # |
|
25 # Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
|
26 # |
|
27 |
|
28 PATH=/usr/bin:/usr/sbin |
|
29 |
|
30 . /lib/svc/share/smf_include.sh |
|
31 |
|
32 USAGE="Usage: $0 <method>" |
|
33 |
|
34 if [[ $# -ne 1 ]] ; then |
|
35 print "$USAGE" >&2 |
|
36 exit $SMF_EXIT_ERR_FATAL |
|
37 fi |
|
38 |
|
39 METHOD="$1" |
|
40 |
|
41 case "$METHOD" in |
|
42 start) |
|
43 /usr/lib/64/colord & |
|
44 # We should wait until the daemon reaches the main loop before |
|
45 # returning, but have no good way of detecting that from here. |
|
46 ;; |
|
47 -*) |
|
48 print "$USAGE" >&2 |
|
49 exit $SMF_EXIT_ERR_FATAL |
|
50 ;; |
|
51 *) |
|
52 print "Invalid method $METHOD" >&2 |
|
53 exit $SMF_EXIT_ERR_FATAL |
|
54 ;; |
|
55 esac |
|
56 |
|
57 exit $SMF_EXIT_OK |