#!/bin/sh
#
# $OpenBSD: samba.rc,v 1.5 2012/07/04 13:00:46 ajacoutot Exp $

# "meta" script running the following rc.d(8) scripts with the given argument;
# note that daemon_flags, daemon_user and daemon_class are not passed to
# the child scripts.
_pkg_scripts="smbd nmbd"

set -A _s -- ${_pkg_scripts}

if [ "$1" = stop ]; then
	i=$(echo ${_pkg_scripts} | wc -w)
	while [ $i -ne 0 ]; do
		i=$((i-1))
		/etc/rc.d/${_s[$i]} $1
	done
else
	for i in ${_pkg_scripts}; do /etc/rc.d/$i $1; done
fi
