blob: be58749b28d6299889fdbf63aa451c3e3835ba4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/bin/sh
#
# $NetBSD: samba.sh,v 1.3 2001/11/21 17:17:44 jlam Exp $
#
# PROVIDE: samba
# KEYWORD: nostart
if [ -d /etc/rc.d -a -f /etc/rc.subr ]
then
. /etc/rc.subr
fi
# NOTE: run_rc_command sets $_arg
#
forward_commands()
{
for file in $COMMAND_LIST; do
/etc/rc.d/$file $_arg
done
}
reverse_commands()
{
REVCOMMAND_LIST=
for file in $COMMAND_LIST; do
REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
done
for file in $REVCOMMAND_LIST; do
/etc/rc.d/$file $_arg
done
}
COMMAND_LIST="nmbd smbd"
name="samba"
start_cmd="forward_commands"
stop_cmd="reverse_commands"
reload_cmd="forward_commands"
status_cmd="forward_commands"
extra_commands="reload status"
if [ ! -d /etc/rc.d ]
then
@ECHO@ -n ' ${name}'
_arg="$1"
${start_cmd}
else
run_rc_command "$1"
fi
|