ports/net/dtcp/files/dtcpc.sh.in
Doug Barton 83eb2c3700 In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().

In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other.
2012-01-14 08:57:23 +00:00

35 lines
812 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: dtcpc
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
# 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=dtcpc_enable
command="%%PREFIX%%/sbin/${name}"
command_interpreter="%%RUBY%%"
pidfile="/var/run/${name}.pid"
extra_commands="reload"
load_rc_config $name
command_args="-u ${dtcpc_username} ${dtcpc_server}"
run_rc_command "$1"