1 <?xml version="1.0"?>
   2 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
   3 <!--
   4 
   5  CDDL HEADER START
   6 
   7  The contents of this file are subject to the terms of the
   8  Common Development and Distribution License (the "License").
   9  You may not use this file except in compliance with the License.
  10 
  11  You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  12  or http://www.opensolaris.org/os/licensing.
  13  See the License for the specific language governing permissions
  14  and limitations under the License.
  15 
  16  When distributing Covered Code, include this CDDL HEADER in each
  17  file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  18  If applicable, add the following below this CDDL HEADER, with the
  19  fields enclosed by brackets "[]" replaced with your own identifying
  20  information: Portions Copyright [yyyy] [name of copyright owner]
  21 
  22  CDDL HEADER END
  23 
  24         Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  25         Copyright 2014 Nexenta Systems, Inc.  All rights reserved
  26         Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
  27 
  28         NOTE:  This service manifest is not editable; its contents will
  29         be overwritten by package or patch operations, including
  30         operating system upgrade.  Make customizations in a different
  31         file.
  32 
  33         Note: if this service is modified to consist of anything other
  34         than a single instance named 'default', you must make changes to
  35         $SRC/head/rpcsvc/daemon_utils.h and libnsl:open_daemon_lock().
  36 -->
  37 
  38 <service_bundle type='manifest' name='SUNWnfssr:nfs-server'>
  39 
  40 <service
  41         name='network/nfs/server'
  42         type='service'
  43         version='1'>
  44 
  45         <dependency name='network'
  46             grouping='require_any'
  47             restart_on='error'
  48             type='service'>
  49                 <service_fmri value='svc:/milestone/network' />
  50         </dependency>
  51 
  52         <dependency name='nlockmgr'
  53             grouping='require_all'
  54             restart_on='error'
  55             type='service'>
  56                 <service_fmri value='svc:/network/nfs/nlockmgr' />
  57         </dependency>
  58 
  59         <dependency name='mapid'
  60             grouping='optional_all'
  61             restart_on='error'
  62             type='service'>
  63                 <service_fmri value='svc:/network/nfs/mapid' />
  64         </dependency>
  65 
  66         <dependency name='rpcbind'
  67             grouping='require_all'
  68             restart_on='restart'
  69             type='service'>
  70                 <service_fmri value='svc:/network/rpc/bind' />
  71         </dependency>
  72 
  73         <dependency name='keyserv'
  74             grouping='optional_all'
  75             restart_on='none'
  76             type='service'>
  77                 <service_fmri value='svc:/network/rpc/keyserv' />
  78         </dependency>
  79 
  80         <dependency name='gss'
  81             grouping='optional_all'
  82             restart_on='none'
  83             type='service'>
  84                 <service_fmri value='svc:/network/rpc/gss' />
  85         </dependency>
  86 
  87         <dependency name='share-group'
  88             grouping='optional_all'
  89             restart_on='none'
  90             type='service'>
  91                 <service_fmri value='svc:/network/shares/group' />
  92         </dependency>
  93 
  94         <dependency name='reparse'
  95             grouping='optional_all'
  96             restart_on='none'
  97             type='service'>
  98                 <service_fmri value='svc:/system/filesystem/reparse' />
  99         </dependency>
 100 
 101         <!-- Must have all local filesystems mounted before we share them -->
 102         <dependency name='filesystem-local'
 103             grouping='require_all'
 104             restart_on='error'
 105             type='service'>
 106                 <service_fmri value='svc:/system/filesystem/local' />
 107         </dependency>
 108 
 109         <dependent
 110                 name='nfs-server_multi-user-server'
 111                 grouping='optional_all'
 112                 restart_on='none'>
 113                 <service_fmri value='svc:/milestone/multi-user-server' />
 114         </dependent>
 115 
 116         <!--
 117           The shareall done as part of the nfs-server method may take a
 118           long time, as the contents of dfstab can be arbitrarily large.
 119           Set the timeout appropriately for both 'start' and 'refresh'.
 120         -->
 121         <exec_method
 122             type='method'
 123             name='start'
 124             exec='/lib/svc/method/nfs-server %m'
 125             timeout_seconds='3600' />
 126 
 127         <exec_method
 128             type='method'
 129             name='refresh'
 130             exec='/lib/svc/method/nfs-server %m'
 131             timeout_seconds='3600' />
 132 
 133         <!--
 134           The stop method runs unshareall as well as up to a 10 second
 135           sleep to do graceful versus forceful shutdown of daemons.  Set
 136           the timeout appropriately.
 137         -->
 138         <exec_method
 139             type='method'
 140             name='stop'
 141             exec='/lib/svc/method/nfs-server %m %{restarter/contract}'
 142             timeout_seconds='3600' />
 143 
 144         <property_group name='application' type='framework'>
 145                 <stability value='Evolving' />
 146                 <propval name='auto_enable' type='boolean' value='true' />
 147         </property_group>
 148 
 149         <property_group name='firewall_context' type='com.sun,fw_definition'>
 150                 <propval name='name' type='astring' value='nfsd' />
 151                 <propval name='ipf_method' type='astring'
 152                     value='/lib/svc/method/nfs-server ipfilter' />
 153         </property_group>
 154  
 155         <property_group name='firewall_config' type='com.sun,fw_configuration'>
 156                 <propval name='policy' type='astring' value='use_global' />
 157                 <propval name='block_policy' type='astring'
 158                         value='use_global' />
 159                 <propval name='apply_to' type='astring' value='' />
 160                 <propval name='apply_to_6' type='astring' value='' />
 161                 <propval name='exceptions' type='astring' value='' />
 162                 <propval name='exceptions_6' type='astring' value='' />
 163                 <propval name='target' type='astring' value='' />
 164                 <propval name='target_6' type='astring' value='' />
 165                 <propval name='value_authorization' type='astring'
 166                         value='solaris.smf.value.firewall.config' />
 167         </property_group>
 168         <instance name='default' enabled='false'>
 169          <property_group name='nfs-props' type='com.oracle.nfs,props'>
 170            <propval name='device' type='astring' value=''/>
 171            <propval name='listen_backlog' type='integer' value='32'/>
 172            <propval name='max_connections' type='integer' value='-1'/>
 173            <propval name='protocol' type='astring' value='ALL'/>
 174            <propval name='server_delegation' type='astring' value='on'/>
 175            <propval name='server_versmax' type='integer' value='4'/>
 176            <propval name='server_versmin' type='integer' value='2'/>
 177            <propval name='servers' type='integer' value='16'/>
 178            <propval name='mountd_listen_backlog' type='integer' value='64'/>
 179            <propval name='mountd_max_threads' type='integer' value='16'/>
 180          </property_group>
 181         </instance>
 182 
 183         <stability value='Stable' />
 184 
 185         <template>
 186                 <common_name>
 187                         <loctext xml:lang='C'>
 188                                 NFS server
 189                         </loctext>
 190                 </common_name>
 191                 <documentation>
 192                         <manpage title='nfsd' section='1M'
 193                                 manpath='/usr/share/man' />
 194                 </documentation>
 195         </template>
 196 </service>
 197 
 198 </service_bundle>