From d78a69d235515463987a3d17e849f901c46d60b4 Mon Sep 17 00:00:00 2001 From: delphij Date: Sun, 27 Feb 2011 07:01:17 +0000 Subject: 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 --- net/iet/Makefile | 1 + net/iet/files/ietd.in | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'net/iet') diff --git a/net/iet/Makefile b/net/iet/Makefile index 2ab6df23b1e1..c5db8bf5ca37 100644 --- a/net/iet/Makefile +++ b/net/iet/Makefile @@ -7,6 +7,7 @@ PORTNAME= iet PORTVERSION= 1.4.20.2 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= SF/iscsitarget/iscsitarget/${PORTVERSION}/ DISTNAME= iscsitarget-${PORTVERSION} diff --git a/net/iet/files/ietd.in b/net/iet/files/ietd.in index adee42dd5277..916bcc963295 100644 --- a/net/iet/files/ietd.in +++ b/net/iet/files/ietd.in @@ -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" +rcvar=`set_rcvar` + command=%%PREFIX%%/sbin/${name} -stop_precmd="ietd_prestop" required_modules="iet" -rcvar=`set_rcvar` +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" -- cgit