summaryrefslogtreecommitdiff
path: root/net/dtcp/files/dtcpc.sh
blob: 51a94af2cf64f8e09182f082a2f85d26bca5d095 (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
#!/bin/sh
#
# $FreeBSD: /repoman/r/pcvs/ports/net/dtcp/files/dtcpc.sh,v 1.1 2004/04/19 18:40:52 ume Exp $
# $NetBSD: dtcpc.sh,v 1.1.1.1 2004/06/05 07:43:25 hamajima Exp $
#

# PROVIDE: dtcpc
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# NOTE for FreeBSD 5.0+:
# If you want this script to start with the base rc scripts
# move dtcpc.sh to /etc/rc.d/dtcpc

prefix=@PREFIX@

# Define these dtcpc_* variables in one of these files:
#	/etc/rc.conf
#	/etc/rc.conf.local
#	/etc/rc.conf.d/dtcpc
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
dtcpc_enable=${dtcpc_enable:-"NO"}		# Enable dtcpc
#dtcpc_program="${prefix}/sbin/dtcpc"		# Location of dtcpc
dtcpc_server=${dtcpc_server:-""}		# DTCP server name
dtcpc_username=${dtcpc_username:-""}		# DTCP user name
dtcpc_flags=${dtcpc_flags:-"-t network -Dl"}	# Flags to dtcpc program

. /etc/rc.subr

name="dtcpc"
rcvar=$name
command="${prefix}/sbin/${name}"
command_interpreter="${prefix}/bin/ruby"
pidfile="/var/run/${name}.pid"
extra_commands="reload"

load_rc_config $name
command_args="${dtcpc_flags} -u ${dtcpc_username} ${dtcpc_server}"
run_rc_command "$1"