16007Sthurlow#!/sbin/sh 26007Sthurlow# 36007Sthurlow# CDDL HEADER START 46007Sthurlow# 56007Sthurlow# The contents of this file are subject to the terms of the 66007Sthurlow# Common Development and Distribution License (the "License"). 76007Sthurlow# You may not use this file except in compliance with the License. 86007Sthurlow# 96007Sthurlow# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 106007Sthurlow# or http://www.opensolaris.org/os/licensing. 116007Sthurlow# See the License for the specific language governing permissions 126007Sthurlow# and limitations under the License. 136007Sthurlow# 146007Sthurlow# When distributing Covered Code, include this CDDL HEADER in each 156007Sthurlow# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 166007Sthurlow# If applicable, add the following below this CDDL HEADER, with the 176007Sthurlow# fields enclosed by brackets "[]" replaced with your own identifying 186007Sthurlow# information: Portions Copyright [yyyy] [name of copyright owner] 196007Sthurlow# 206007Sthurlow# CDDL HEADER END 216007Sthurlow# 22*12556SGordon.Ross@Sun.COM 236007Sthurlow# 24*12556SGordon.Ross@Sun.COM# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 256007Sthurlow# 266007Sthurlow 276007Sthurlow# 286007Sthurlow# Start/stop client SMB service 296007Sthurlow# 306007Sthurlow 316007Sthurlow. /lib/svc/share/smf_include.sh 326007Sthurlow 33*12556SGordon.Ross@Sun.COMresult=${SMF_EXIT_OK} 34*12556SGordon.Ross@Sun.COM 356007Sthurlowcase "$1" in 366007Sthurlow'start') 37*12556SGordon.Ross@Sun.COM # Start the main smbiod service 38*12556SGordon.Ross@Sun.COM /usr/lib/smbfs/smbiod-svc 39*12556SGordon.Ross@Sun.COM result=$? 40*12556SGordon.Ross@Sun.COM # Do smbfs mounts (background) 41*12556SGordon.Ross@Sun.COM /usr/bin/ctrun -l none \ 42*12556SGordon.Ross@Sun.COM /sbin/mountall -F smbfs 436007Sthurlow ;; 446007Sthurlow 456007Sthurlow'stop') 46*12556SGordon.Ross@Sun.COM # First destroy the mounts, 476007Sthurlow /sbin/umountall -F smbfs 48*12556SGordon.Ross@Sun.COM # then kill the smbiod service. 49*12556SGordon.Ross@Sun.COM smf_kill_contract $2 TERM 1 50*12556SGordon.Ross@Sun.COM result=$? 516007Sthurlow ;; 526007Sthurlow 536007Sthurlow*) 546007Sthurlow echo "Usage: $0 { start | stop }" 55*12556SGordon.Ross@Sun.COM result=1 566007Sthurlow ;; 576007Sthurlowesac 58*12556SGordon.Ross@Sun.COMexit $result 59