Added rc.d scripts (copied from pkgsrc/net/samba/files/).
This commit is contained in:
parent
5880a0d3d3
commit
71f6c82a7a
3 changed files with 114 additions and 0 deletions
30
samba3/files/nmbd.sh
Executable file
30
samba3/files/nmbd.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!@RCD_SCRIPTS_SHELL@
|
||||
#
|
||||
# $NetBSD: nmbd.sh,v 1.1 2003/10/14 07:35:01 jeremy-c-reed Exp $
|
||||
#
|
||||
# PROVIDE: nmbd
|
||||
# REQUIRE: DAEMON
|
||||
|
||||
if [ -f /etc/rc.subr ]
|
||||
then
|
||||
. /etc/rc.subr
|
||||
fi
|
||||
|
||||
name="nmbd"
|
||||
rcvar=$name
|
||||
command="@PREFIX@/sbin/${name}"
|
||||
required_files="@SAMBA_ETCDIR@/smb.conf"
|
||||
extra_commands="reload"
|
||||
command_args="-D" # _must_ start as daemon from rc.d;
|
||||
# add more flags through ${${name}_flags}
|
||||
|
||||
reload_cmd=":" # avoid dumping debug output on SIGHUP
|
||||
|
||||
if [ -f /etc/rc.subr ]
|
||||
then
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
else
|
||||
@ECHO@ -n ' ${name}'
|
||||
${command} ${nmbd_flags} ${command_args}
|
||||
fi
|
56
samba3/files/samba.sh
Normal file
56
samba3/files/samba.sh
Normal file
|
@ -0,0 +1,56 @@
|
|||
#!@RCD_SCRIPTS_SHELL@
|
||||
#
|
||||
# $NetBSD: samba.sh,v 1.1 2003/10/14 07:35:01 jeremy-c-reed Exp $
|
||||
#
|
||||
# KEYWORD: nostart
|
||||
|
||||
if [ -f /etc/rc.subr ]
|
||||
then
|
||||
. /etc/rc.subr
|
||||
fi
|
||||
|
||||
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 smbd"
|
||||
|
||||
name="samba"
|
||||
start_cmd="forward_commands"
|
||||
stop_cmd="reverse_commands"
|
||||
reload_cmd="forward_commands"
|
||||
status_cmd="forward_commands"
|
||||
extra_commands="reload status"
|
||||
|
||||
if [ -f /etc/rc.subr ]
|
||||
then
|
||||
run_rc_command "$1"
|
||||
else
|
||||
@ECHO@ -n ' ${name}'
|
||||
_arg="$1"
|
||||
${start_cmd}
|
||||
fi
|
28
samba3/files/smbd.sh
Executable file
28
samba3/files/smbd.sh
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!@RCD_SCRIPTS_SHELL@
|
||||
#
|
||||
# $NetBSD: smbd.sh,v 1.1 2003/10/14 07:35:01 jeremy-c-reed Exp $
|
||||
#
|
||||
# PROVIDE: smbd
|
||||
# REQUIRE: DAEMON
|
||||
|
||||
if [ -f /etc/rc.subr ]
|
||||
then
|
||||
. /etc/rc.subr
|
||||
fi
|
||||
|
||||
name="smbd"
|
||||
rcvar=$name
|
||||
command="@PREFIX@/sbin/${name}"
|
||||
required_files="@SAMBA_ETCDIR@/smb.conf"
|
||||
extra_commands="reload"
|
||||
command_args="-D" # _must_ start as daemon from rc.d;
|
||||
# add more flags through ${${name}_flags}
|
||||
|
||||
if [ -f /etc/rc.subr ]
|
||||
then
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
else
|
||||
@ECHO@ -n ' ${name}'
|
||||
${command} ${smbd_flags} ${command_args}
|
||||
fi
|
Loading…
Reference in a new issue