Print this page
12071 clarify implementation of single_instance in SMF services
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
   1 <?xml version="1.0"?>
   2 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
   3 <!--
   4  Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
   5  Use is subject to license terms.
   6 


   7  CDDL HEADER START
   8 
   9  The contents of this file are subject to the terms of the
  10  Common Development and Distribution License (the "License").
  11  You may not use this file except in compliance with the License.
  12 
  13  You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  14  or http://www.opensolaris.org/os/licensing.
  15  See the License for the specific language governing permissions
  16  and limitations under the License.
  17 
  18  When distributing Covered Code, include this CDDL HEADER in each
  19  file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  20  If applicable, add the following below this CDDL HEADER, with the
  21  fields enclosed by brackets "[]" replaced with your own identifying
  22  information: Portions Copyright [yyyy] [name of copyright owner]
  23 
  24  CDDL HEADER END
  25 
  26         NOTE:  This service manifest is not editable; its contents will


  33 
  34 <service
  35         name='network/physical'
  36         type='service'
  37         version='1'>
  38 
  39         <!-- ifconfig needs loopback for IPC with dhcpagent -->
  40         <dependency
  41                 name='loopback'
  42                 grouping='require_all'
  43                 restart_on='none'
  44                 type='service'>
  45                 <service_fmri value='svc:/network/loopback' />
  46         </dependency>
  47 
  48         <instance name='default' enabled='true'>
  49 
  50         <!--
  51                 physical:default and physical:nwam are mutually exclusive.
  52                 Use a one-way dependency for now since two-way exclude_all
  53                 does not work; enforcement of single_instance in the future
  54                 will fix this.
  55         -->
  56         <dependency
  57                 name='physical_nwam'
  58                 grouping='exclude_all'
  59                 restart_on='none'
  60                 type='service'>
  61                 <service_fmri value='svc:/network/physical:nwam' />
  62         </dependency>
  63 
  64         <exec_method
  65                 type='method'
  66                 name='start'
  67                 exec='/lib/svc/method/net-physical'
  68                 timeout_seconds='600' />
  69 
  70         <exec_method
  71                 type='method'
  72                 name='stop'
  73                 exec=':true'
  74                 timeout_seconds='3' />


   1 <?xml version="1.0"?>
   2 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
   3 <!--
   4  Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
   5  Use is subject to license terms.
   6 
   7  Copyright 2019 Joyent, Inc.
   8 
   9  CDDL HEADER START
  10 
  11  The contents of this file are subject to the terms of the
  12  Common Development and Distribution License (the "License").
  13  You may not use this file except in compliance with the License.
  14 
  15  You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  16  or http://www.opensolaris.org/os/licensing.
  17  See the License for the specific language governing permissions
  18  and limitations under the License.
  19 
  20  When distributing Covered Code, include this CDDL HEADER in each
  21  file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  22  If applicable, add the following below this CDDL HEADER, with the
  23  fields enclosed by brackets "[]" replaced with your own identifying
  24  information: Portions Copyright [yyyy] [name of copyright owner]
  25 
  26  CDDL HEADER END
  27 
  28         NOTE:  This service manifest is not editable; its contents will


  35 
  36 <service
  37         name='network/physical'
  38         type='service'
  39         version='1'>
  40 
  41         <!-- ifconfig needs loopback for IPC with dhcpagent -->
  42         <dependency
  43                 name='loopback'
  44                 grouping='require_all'
  45                 restart_on='none'
  46                 type='service'>
  47                 <service_fmri value='svc:/network/loopback' />
  48         </dependency>
  49 
  50         <instance name='default' enabled='true'>
  51 
  52         <!--
  53                 physical:default and physical:nwam are mutually exclusive.
  54                 Use a one-way dependency for now since two-way exclude_all
  55                 does not work.

  56         -->
  57         <dependency
  58                 name='physical_nwam'
  59                 grouping='exclude_all'
  60                 restart_on='none'
  61                 type='service'>
  62                 <service_fmri value='svc:/network/physical:nwam' />
  63         </dependency>
  64 
  65         <exec_method
  66                 type='method'
  67                 name='start'
  68                 exec='/lib/svc/method/net-physical'
  69                 timeout_seconds='600' />
  70 
  71         <exec_method
  72                 type='method'
  73                 name='stop'
  74                 exec=':true'
  75                 timeout_seconds='3' />