Fix several problems with the rc.d script based on dougb@'s comments:

- Set a default value (NO) for _enable;
 - Use REQUIRE: LOGIN since this is not required to start that early;
 - Make the style more like the standard script.

Submitted by:	dougb
This commit is contained in:
Xin LI 2011-02-27 07:01:17 +00:00
parent f7fd413b58
commit ecb80e8eeb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=269870
2 changed files with 14 additions and 7 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= iet
PORTVERSION= 1.4.20.2
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= SF/iscsitarget/iscsitarget/${PORTVERSION}/
DISTNAME= iscsitarget-${PORTVERSION}

View file

@ -1,21 +1,27 @@
#!/bin/sh
# PROVIDE: ietd
# REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv
# BEFORE: LOGIN
# $FreeBSD$
#
# PROVIDE: ietd
# REQUIRE: LOGIN
# KEYWORD: shutdown
. /etc/rc.subr
name="ietd"
command=%%PREFIX%%/sbin/${name}
stop_precmd="ietd_prestop"
required_modules="iet"
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/${name}
required_modules="iet"
stop_precmd="ietd_prestop"
load_rc_config $name
: ${ietd_enable:="NO"}
ietd_prestop()
{
%%PREFIX%%/sbin/ietadm --op delete
}
load_rc_config $name
run_rc_command "$1"