nfs-server revision 7ddce99911fbb5e44b38ac65e991a22e42267ee9
2N/A# The contents of this file are subject to the terms of the 2N/A# Common Development and Distribution License (the "License"). 2N/A# You may not use this file except in compliance with the License. 2N/A# See the License for the specific language governing permissions 2N/A# and limitations under the License. 2N/A# When distributing Covered Code, include this CDDL HEADER in each 2N/A# If applicable, add the following below this CDDL HEADER, with the 2N/A# fields enclosed by brackets "[]" replaced with your own identifying 2N/A# information: Portions Copyright [yyyy] [name of copyright owner] 2N/A# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 2N/A# Copyright 2015 Nexenta Systems, Inc. All rights reserved. 2N/A# Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> 2N/A# Handling a corner case here. If we were in offline state due to an 2N/A# unsatisfied dependency, the ipf_method process wouldn't have generated 2N/A# the ipfilter configuration. When we transition to online because the 2N/A# dependency is satisfied, the start method will have to generate the 2N/A# ipfilter configuration. To avoid all possible deadlock scenarios, 2N/A# we restart ipfilter which will regenerate the ipfilter configuration 2N/A# for the entire system. 2N/A# The ipf_method process signals that it didn't generate ipf rules by 2N/A# when the file is missing. 2N/A # - ipfilter isn't online 2N/A # - global policy is 'custom' 2N/A # - service's policy is 'use_global' 2N/A # The NFS server is not supported in a local zone 2N/A echo "The NFS server is not supported in a local zone" 2N/A # Share all file systems enabled for sharing. sharemgr understands # regular shares and ZFS shares and will handle both. Technically, # the shares would have been started long before getting here since # nfsd has a dependency on them. # restart stopped shares from the repository # Options for nfsd are now set in SMF echo "$0: mountd failed with $rc" echo "$0: nfsd failed with $rc" # Unshare all shared file systems using NFS # Kill any processes left in service contract # NFS related services are RPC. nfs/server has nfsd which has # well-defined port number but mountd is an RPC daemon. # Essentially, we generate rules for the following "services" # The following services are enabled for both nfs client and # server, if nfs/client is enabled we'll treat them as client # services and simply allow incoming traffic. # nfs/server configuration is processed in the start method. # mountd IPv6 ports are also reachable through IPv4, so include # them when generating IPv4 rules. # rquota IPv6 ports are also reachable through IPv4, so include # them when generating IPv4 rules. # Handle the client services here if [
"$isrpc" =
"true" ];
then # IPv6 ports are also reachable through IPv4, so include # them when generating IPv4 rules. echo "Usage: $0 { start | stop | refresh }"