nfs-server revision 4191ce11b7a4c9ac19d88acf17d30fd50a4464b0
1276N/A# The contents of this file are subject to the terms of the 1276N/A# Common Development and Distribution License (the "License"). 1276N/A# You may not use this file except in compliance with the License. 1276N/A# See the License for the specific language governing permissions 1276N/A# and limitations under the License. 1276N/A# When distributing Covered Code, include this CDDL HEADER in each 1276N/A# If applicable, add the following below this CDDL HEADER, with the 1276N/A# fields enclosed by brackets "[]" replaced with your own identifying 1276N/A# information: Portions Copyright [yyyy] [name of copyright owner] 1276N/A# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 1276N/A# Copyright 2012 Nexenta Systems, Inc. All rights reserved. 1276N/A# Handling a corner case here. If we were in offline state due to an 1276N/A# unsatisfied dependency, the ipf_method process wouldn't have generated 1276N/A# the ipfilter configuration. When we transition to online because the 1276N/A# dependency is satisfied, the start method will have to generate the 1276N/A# ipfilter configuration. To avoid all possible deadlock scenarios, 1276N/A# we restart ipfilter which will regenerate the ipfilter configuration 1276N/A# The ipf_method process signals that it didn't generate ipf rules by 1276N/A # - global policy is 'custom' 1276N/A # - service's policy is 'use_global' 1276N/A # The NFS server is not supported in a local zone 1276N/A echo "The NFS server is not supported in a local zone" 1276N/A # Share all file systems enabled for sharing. sharemgr understands 1276N/A # regular shares and ZFS shares and will handle both. Technically, 1276N/A # the shares would have been started long before getting here since 1276N/A # nfsd has a dependency on them. 1276N/A # restart stopped shares from the repository 1276N/A # Start up mountd and nfsd if anything is exported. 1276N/A # If auto-enable behavior is disabled, always start nfsd 1276N/A # Options for nfsd are now set in SMF 1276N/A echo "No NFS filesystems are shared" 1276N/A # Unshare all shared file systems using NFS 1276N/A # Kill any processes left in service contract 1276N/A # well-defined port number but mountd is an RPC daemon. 1276N/A # Essentially, we generate rules for the following "services" 1276N/A # The following services are enabled for both nfs client and 1276N/A # server so we'll treat them as client services and simply 1276N/A # Handle the client services here 1276N/A echo "pass in log quick proto tcp from any" \
1276N/A "to any port = ${tport} flags S " \
1276N/A echo "pass in log quick proto udp from any" \
1276N/A echo "Usage: $0 { start | stop | refresh }"