components/ptp/Solaris/ptp.xml
branchs11-update
changeset 2913 34273351da77
child 2987 01d2e6a3aae8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/ptp/Solaris/ptp.xml	Thu Jan 23 15:00:25 2014 -0800
@@ -0,0 +1,131 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+ CDDL HEADER START
+
+ The contents of this file are subject to the terms of the
+ Common Development and Distribution License (the "License").
+ You may not use this file except in compliance with the License.
+
+ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ or http://www.opensolaris.org/os/licensing.
+ See the License for the specific language governing permissions
+ and limitations under the License.
+
+ When distributing Covered Code, include this CDDL HEADER in each
+ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ If applicable, add the following below this CDDL HEADER, with the
+ fields enclosed by brackets "[]" replaced with your own identifying
+ information: Portions Copyright [yyyy] [name of copyright owner]
+
+ CDDL HEADER END
+
+ Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+
+ NOTE:  This service manifest is not editable; its contents will
+ be overwritten by package or patch operations, including
+ operating system upgrade.  Make customizations in a different
+ file.
+-->
+
+<service_bundle type='manifest' name='service-network:ptp'>
+
+<service name='network/ptp' type='service' version='1'>
+	<single_instance />
+	<dependency 
+		name='network'
+		grouping='require_any'
+		restart_on='error'
+		type='service'>
+		<service_fmri value='svc:/network/service' />
+	</dependency>
+
+	<dependency
+		name='filesystem'
+		grouping='require_all'
+		restart_on='error'
+		type='service'>
+		    <service_fmri value='svc:/system/filesystem/minimal' />
+	</dependency>
+
+	<dependency
+		name='ntp'
+		grouping='exclude_all'
+		restart_on='none'
+		type='service'>
+		<service_fmri value='svc:/network/ntp:default' />
+	</dependency>
+
+	<exec_method type='method' name='start'
+    	    exec='/lib/svc/method/ptp %m' timeout_seconds='60'>
+		<method_context>
+			<method_credential
+			    user='root' group='root'
+			    privileges='basic,!file_link_any,!proc_info,!proc_session,net_privaddr,net_rawaccess,sys_time'
+			/>
+		</method_context>
+	</exec_method>
+
+	<exec_method type='method' name='restart'
+    	    exec='/lib/svc/method/ptp %m' timeout_seconds='180'>
+		<method_context>
+			<method_credential
+			    user='root' group='root'
+			    privileges='basic,!file_link_any,!proc_info,!proc_session,net_privaddr,net_rawaccess,sys_time'
+			/>
+		</method_context>
+	</exec_method>
+
+	<exec_method type='method' name='stop'
+    	    exec=':kill' timeout_seconds='60' />
+
+	<property_group name='general' type='framework'>
+		<!-- to start stop ptpd -->
+		<propval name='action_authorization' type='astring'
+		value='solaris.smf.manage.ptp' />
+		<propval name='value_authorization' type='astring'
+		value='solaris.smf.value.ptp' />
+	</property_group>
+
+	<instance name="default" enabled="false">
+		<property_group name='config' type='application' >
+			<!-- default property settings for ptpd(1M). -->
+		
+			<propval name='listen_ifname' type='astring' value='' />
+
+			<!-- node_type could be either slave or master -->
+			<propval name='node_type' type='astring' value='' />
+			<propval name='use_hw' type='boolean' value='false' />
+			<propval name='domain' type='integer' value='0' />
+			<propval name='announce_interval' type='integer' value='2' />
+			<propval name='sync_interval' type='integer' value='1' />
+
+			<!-- default is /var/log/ptp.log -->
+			<propval name='logfile' type='astring'
+			value='/var/log/ptp.log' />
+
+			<propval name='other_options' type='astring' value='' />
+
+			<!-- to change properties -->
+			<propval
+			    name='value_authorization'
+			    type='astring'
+			    value='solaris.smf.value.ptp' />
+		
+		</property_group>
+	</instance>
+	<stability value='Unstable' />
+
+	<template>
+		<common_name>
+			<loctext xml:lang='C'>
+			Precision Time Protocol (PTP) IEEE 1588-2008 (Version 2)
+			</loctext>
+		</common_name>
+		<documentation>
+			<manpage title='ptpd' section='1M' />
+		</documentation>
+	</template>
+</service>
+
+</service_bundle>