14bff34e3Sthurlow#!/sbin/sh 24bff34e3Sthurlow# 34bff34e3Sthurlow# CDDL HEADER START 44bff34e3Sthurlow# 54bff34e3Sthurlow# The contents of this file are subject to the terms of the 64bff34e3Sthurlow# Common Development and Distribution License (the "License"). 74bff34e3Sthurlow# You may not use this file except in compliance with the License. 84bff34e3Sthurlow# 94bff34e3Sthurlow# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 104bff34e3Sthurlow# or http://www.opensolaris.org/os/licensing. 114bff34e3Sthurlow# See the License for the specific language governing permissions 124bff34e3Sthurlow# and limitations under the License. 134bff34e3Sthurlow# 144bff34e3Sthurlow# When distributing Covered Code, include this CDDL HEADER in each 154bff34e3Sthurlow# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 164bff34e3Sthurlow# If applicable, add the following below this CDDL HEADER, with the 174bff34e3Sthurlow# fields enclosed by brackets "[]" replaced with your own identifying 184bff34e3Sthurlow# information: Portions Copyright [yyyy] [name of copyright owner] 194bff34e3Sthurlow# 204bff34e3Sthurlow# CDDL HEADER END 214bff34e3Sthurlow# 22*a547be5dSGordon Ross 234bff34e3Sthurlow# 24*a547be5dSGordon Ross# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 254bff34e3Sthurlow# 264bff34e3Sthurlow 274bff34e3Sthurlow# 284bff34e3Sthurlow# Start/stop client SMB service 294bff34e3Sthurlow# 304bff34e3Sthurlow 314bff34e3Sthurlow. /lib/svc/share/smf_include.sh 324bff34e3Sthurlow 33*a547be5dSGordon Rossresult=${SMF_EXIT_OK} 34*a547be5dSGordon Ross 354bff34e3Sthurlowcase "$1" in 364bff34e3Sthurlow'start') 37*a547be5dSGordon Ross # Start the main smbiod service 38*a547be5dSGordon Ross /usr/lib/smbfs/smbiod-svc 39*a547be5dSGordon Ross result=$? 40*a547be5dSGordon Ross # Do smbfs mounts (background) 41*a547be5dSGordon Ross /usr/bin/ctrun -l none \ 424bff34e3Sthurlow /sbin/mountall -F smbfs 434bff34e3Sthurlow ;; 444bff34e3Sthurlow 454bff34e3Sthurlow'stop') 46*a547be5dSGordon Ross # First destroy the mounts, 474bff34e3Sthurlow /sbin/umountall -F smbfs 48*a547be5dSGordon Ross # then kill the smbiod service. 49*a547be5dSGordon Ross smf_kill_contract $2 TERM 1 50*a547be5dSGordon Ross result=$? 514bff34e3Sthurlow ;; 524bff34e3Sthurlow 534bff34e3Sthurlow*) 544bff34e3Sthurlow echo "Usage: $0 { start | stop }" 55*a547be5dSGordon Ross result=1 564bff34e3Sthurlow ;; 574bff34e3Sthurlowesac 58*a547be5dSGordon Rossexit $result 59