Page MenuHomeFreeBSD

D21431.id61402.diff
No OneTemporary

D21431.id61402.diff

Index: head/net/htpdate/Makefile
===================================================================
--- head/net/htpdate/Makefile
+++ head/net/htpdate/Makefile
@@ -3,6 +3,7 @@
PORTNAME= htpdate
PORTVERSION= 1.2.2
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= http://www.vervest.org/htp/archive/c/ \
http://twekkel.home.xs4all.nl/htp/
Index: head/net/htpdate/files/htpdate.in
===================================================================
--- head/net/htpdate/files/htpdate.in
+++ head/net/htpdate/files/htpdate.in
@@ -3,8 +3,7 @@
# $FreeBSD$
# PROVIDE: htpdate
-# REQUIRE: NETWORKING SERVERS
-# BEFORE: DAEMON
+# REQUIRE: NETWORKING syslogd
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf to enable htpdate:
@@ -14,31 +13,27 @@
. /etc/rc.subr
-load_rc_config htpdate
-
-htpdate_enable="${htpdate_enable:-"NO"}"
-htpdate_servers="${htpdate_servers:-"www.example.com"}"
-htpdate_flags="${htpdate_flags:-"-l -s -D"}"
-
name=htpdate
+desc="HTTP Time Protocol daemon"
rcvar=htpdate_enable
-servers=${htpdate_servers}
-pidfile=/var/run/htpdate.pid
-command="/usr/local/bin/htpdate"
-command_args="${htpdate_flags} $servers"
-stop_cmd=htpdate_stop
+load_rc_config htpdate
-htpdate_stop ()
+: ${htpdate_enable:="NO"}
+: ${htpdate_servers:="www.example.com"}
+: ${htpdate_flags:="-l -s -D"}
+
+start_precmd=htpdate_prestart
+command="%%PREFIX%%/bin/htpdate"
+command_args="${htpdate_servers}"
+
+htpdate_prestart()
{
- if [ -f ${pidfile} ]; then
- echo "Stopping htpdate."
- kill `cat ${pidfile}`
- else
- echo "htpdate is not running."
- fi
+ local _pidfile="/var/run/htpdate.pid"
- rm -f ${pidfile}
+ if [ -z "$(check_process "${command}")" ]; then
+ rm -f -- "${_pidfile}"
+ fi
}
run_rc_command "$1"

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 21, 11:29 AM (15 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31907416
Default Alt Text
D21431.id61402.diff (1 KB)

Event Timeline