Initial recipe for NUT-2.7.4
[unleashed-userland.git] / components / sysutils / nut / files / nut.xml
blobc05dd590e31d4ecd95135cc389a1bf3f4ea37251
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:allInOne'>
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. -- Not a hard requirement good for everybody.
56         -->
57 <!--
58                 <dependency
59                 name='syslog'
60                 grouping='optional_all'
61                 restart_on='none'
62                 type='service'>
63                         <service_fmri
64                 value='svc:/system/system-log:default'/>
65                 </dependency>
66 -->
68         <!--
69           Wait for network to be started in order to reach remote hosts.
70           - Not required on standalone machines using serial or USB UPSes
71         -->
72 <!--
73                 <dependency
74                 name='network-service'
75                 grouping='require_all'
76                 restart_on='none'
77                 type='service'>
78                         <service_fmri value='svc:/network/service' />
79                 </dependency>
80 -->
82         <!--
83           The nut start/stop methods.
84         -->
86                 <exec_method
87                 type='method'
88                 name='start'
89                 exec='/lib/svc/method/svc-nut %m'
90                 timeout_seconds='60'/>
92                 <exec_method
93                 type='method'
94                 name='stop'
95                 exec='/lib/svc/method/svc-nut %m'
96                 timeout_seconds='60' />
98                 <property_group name='startd' type='framework'>
99                 <!--
100                   Sub-process core dumps and external kill signals are not
101                   considered errors, so the service should be restarted.
102                         -->
103                         <propval name='ignore_error' type='astring'
104                          value='core,signal' />
105                 </property_group>
107         <!-- Really unstable - this service should be evolved! -->
108                 <stability value='Unstable' />
110                 <template>
111                         <common_name>
112                                 <loctext xml:lang='C'>
113                                 NUT all-in-one SMF wrapper
114                                 </loctext>
115                         </common_name>
116                         <documentation>
117                                 <manpage title='upsdrvctl' section='8'
118                                 manpath='/usr/share/man' />
119                                 <manpage title='upsd' section='8'
120                                 manpath='/usr/share/man' />
121                                 <manpage title='upsmon' section='8'
122                                 manpath='/usr/share/man' />
123                                 <manpage title='ups.conf' section='5'
124                                 manpath='/usr/share/man' />
125                                 <manpage title='upsmon.conf' section='5'
126                                 manpath='/usr/share/man' />
127                                 <manpage title='upsd.conf' section='5'
128                                 manpath='/usr/share/man' />
129                                 <manpage title='upsd.users' section='5'
130                                 manpath='/usr/share/man' />
131                         </documentation>
132                 </template>
133         </service>
135 </service_bundle>