ajacoutot 72c5e6c88d Rewrite samba.rc and make it a wrapper script that calls the provided
rc.d(8) script. This is much more simple, makes much more sense and
allow for proper debugging.

discussed with robert@
2011-04-03 18:07:52 +00:00

19 lines
394 B
Bash

#!/bin/sh
#
# $OpenBSD: samba.rc,v 1.2 2011/04/03 18:07:52 ajacoutot Exp $
# "meta" script running the following rc.d(8) scripts with the given argument
_rc_scripts="smbd nmbd"
set -A _s -- ${_rc_scripts}
if [ "$1" = stop ]; then
i=$(echo ${_rc_scripts} | wc -w)
while [ $i -ne 0 ]; do
i=$((i-1))
/etc/rc.d/${_s[$i]} $1
done
else
for i in ${_rc_scripts}; do /etc/rc.d/$i $1; done
fi