[BACK]Return to samba.sh CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / net / samba30 / files

File: [cvs.NetBSD.org] / pkgsrc / net / samba30 / files / Attic / samba.sh (download)

Revision 1.1.1.1 (vendor branch), Thu Dec 15 22:23:24 2011 UTC (11 years, 3 months ago) by asau
Branch: TNF
CVS Tags: pkgsrc-base
Changes since 1.1: +0 -0 lines

Reimport Samba 3.0.37 from net/samba as net/samba30 as part of Samba packages rotation.

#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: samba.sh,v 1.1.1.1 2011/12/15 22:23:24 asau Exp $
#
# KEYWORD: nostart
#
#	This script is intended for the end-user.
#	It is not started by /etc/rc.
#	It manipulates various samba services (smbd, nmbd, winbindd),
#	which are controlled via their appropriate rc.conf(5) settings.
#

. /etc/rc.subr

rcd_dir=`@DIRNAME@ $0`

# NOTE: run_rc_command sets $rc_arg
#
forward_commands()
{
	# Backward compat with NetBSD <1.6:
	[ -z "$rc_arg" ] && rc_arg=$_arg

	for file in $COMMAND_LIST; do
		$rcd_dir/$file $rc_arg
	done
}

reverse_commands()
{
	# Backward compat with NetBSD <1.6:
	[ -z "$rc_arg" ] && rc_arg=$_arg

	REVCOMMAND_LIST=
	for file in $COMMAND_LIST; do
		REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
	done
	for file in $REVCOMMAND_LIST; do
		$rcd_dir/$file $rc_arg
	done
}

COMMAND_LIST="nmbd @WINBINDD_RCD_SCRIPT@ smbd"

name="samba"
start_cmd="forward_commands"
stop_cmd="reverse_commands"
reload_cmd="forward_commands"
status_cmd="forward_commands"
extra_commands="reload status"

run_rc_command "$1"