components/desktop/colord/files/svc-colord
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Tue, 23 Aug 2016 18:13:17 -0700
changeset 6676 447ee8f869db
permissions -rwxr-xr-x
23245618 Deliver colord 1.1.8 in Solaris PSARC/2016/378 colord
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6676
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     1
#! /bin/ksh93
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     2
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     3
#
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     4
# CDDL HEADER START
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     5
#
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     6
# The contents of this file are subject to the terms of the
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     7
# Common Development and Distribution License (the "License").
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     8
# You may not use this file except in compliance with the License.
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     9
#
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    10
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    11
# or http://www.opensolaris.org/os/licensing.
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    12
# See the License for the specific language governing permissions
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    13
# and limitations under the License.
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    14
#
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    15
# When distributing Covered Code, include this CDDL HEADER in each
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    16
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    17
# If applicable, add the following below this CDDL HEADER, with the
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    18
# fields enclosed by brackets "[]" replaced with your own identifying
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    19
# information: Portions Copyright [yyyy] [name of copyright owner]
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    20
#
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    21
# CDDL HEADER END
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    22
#
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    23
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    24
#
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    25
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    26
#
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    27
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    28
PATH=/usr/bin:/usr/sbin
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    29
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    30
. /lib/svc/share/smf_include.sh
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    31
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    32
USAGE="Usage: $0 <method>"
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    33
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    34
if [[ $# -ne 1 ]] ; then
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    35
	print "$USAGE" >&2
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    36
	exit $SMF_EXIT_ERR_FATAL
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    37
fi
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    38
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    39
METHOD="$1"
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    40
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    41
case "$METHOD" in
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    42
	start)
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    43
		/usr/lib/64/colord &
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    44
		# We should wait until the daemon reaches the main loop before
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    45
		# returning, but have no good way of detecting that from here.
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    46
		;;
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    47
	-*)
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    48
		print "$USAGE" >&2
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    49
		exit $SMF_EXIT_ERR_FATAL
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    50
		;;
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    51
	*)
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    52
		print "Invalid method $METHOD" >&2
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    53
		exit $SMF_EXIT_ERR_FATAL
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    54
		;;
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    55
esac
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    56
447ee8f869db 23245618 Deliver colord 1.1.8 in Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    57
exit $SMF_EXIT_OK