gcc-6: use $(GNU_ARCH) in manifest
[unleashed-userland.git] / components / sysutils / nut / files / nut.xml
blobeea8895d847cb272de218c27b4e28f617f168d2b
1 <?xml version="1.0"?>
2 <!--
4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 # You may only use this file in accordance with the terms of version
7 # 1.0 of the CDDL.
9 # A full copy of the text of the CDDL should have accompanied this
10 # source.  A copy of the CDDL is also available via the Internet at
11 # http://www.illumos.org/license/CDDL.
13 -->
15 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
16 <!--
18 # Copyright 2016 Jim Klimov
20 -->
22 <service_bundle type='manifest' name='nut'>
24         <service name='system/power/nut' type='service' version='1'>
26         <!--
27           Configure a default instance for the service since it doesn't
28           require additional configuration intervention before it starts.
29         -->
30                 <create_default_instance enabled='false' />
31                         
32         <!--
33           Wait for all local and usr filesystem to be mounted - project is
34           located in /usr/sbin.
35         -->
36                 <dependency
37                 name='fs-local'
38                 type='service'
39                 grouping='require_all'
40                 restart_on='none'>
41                         <service_fmri value='svc:/system/filesystem/local' />
42                 </dependency>
43                 
44                 <dependency
45                 name='filesystem-usr'
46                 grouping='require_all'
47                 restart_on='none'
48                 type='service'>
49                         <service_fmri
50                 value='svc:/system/filesystem/usr:default'/>
51                 </dependency>
53         <!--
54           Wait for syslog to be started in order to write system
55           messages from the kernel.
56         -->
57                 <dependency
58                 name='syslog'
59                 grouping='optional_all'
60                 restart_on='none'
61                 type='service'>
62                         <service_fmri
63                 value='svc:/system/system-log:default'/>
64                 </dependency>
66         <!--
67           Wait for network to be started in order to reach remote hosts.
68         -->
69                 <dependency
70                 name='network-service'
71                 grouping='optional_all'
72                 restart_on='none'
73                 type='service'>
74                         <service_fmri value='svc:/network/service' />
75                 </dependency>
77         <!--
78           The nut start/stop methods.
79         -->
81                 <exec_method
82                 type='method'
83                 name='start'
84                 exec='/lib/svc/method/svc-nut %m'
85                 timeout_seconds='60'/>
87                 <exec_method
88                 type='method'
89                 name='stop'
90                 exec=':kill'
91                 timeout_seconds='60' />
93                 <property_group name='startd' type='framework'>
94                 <!--
95                   Sub-process core dumps and external kill signals are not
96                   considered errors, so the service should be restarted.
97                         -->
98                         <propval name='ignore_error' type='astring'
99                          value='core,signal' />
100                 </property_group>
102         <!-- Really unstable - this service should be evolved! -->
103                 <stability value='Unstable' />
105                 <template>
106                         <common_name>
107                                 <loctext xml:lang='C'>
108                                 NUT ups information service
109                                 </loctext>
110                         </common_name>
111                         <documentation>
112                                 <manpage title='upsdrvctl' section='8'
113                                 manpath='/usr/share/man' />
114                                 <manpage title='upsd' section='8'
115                                 manpath='/usr/share/man' />
116                                 <manpage title='ups.conf' section='5'
117                                 manpath='/usr/share/man' />
118                                 <manpage title='upsd.conf' section='5'
119                                 manpath='/usr/share/man' />
120                                 <manpage title='upsd.users' section='5'
121                                 manpath='/usr/share/man' />
122                         </documentation>
123                 </template>
124         </service>
126 </service_bundle>