svn commit: r353008 - in head/security: clamav clamav-devel clamav-devel/files clamav/files

Mark Felder feld at FreeBSD.org
Mon May 5 14:38:19 UTC 2014


Author: feld
Date: Mon May  5 14:38:17 2014
New Revision: 353008
URL: http://svnweb.freebsd.org/changeset/ports/353008
QAT: https://qat.redports.org/buildarchive/r353008/

Log:
  rc script spring cleaning -- now passes rclint
  
  Previously it would try to launch even if there were no rc.conf entries
  
  Reviewed by:	garga
  Sponsored by:	SupraNet Communications, Inc

Modified:
  head/security/clamav-devel/Makefile
  head/security/clamav-devel/files/clamav-clamd.in
  head/security/clamav-devel/files/clamav-freshclam.in
  head/security/clamav-devel/files/clamav-milter.in
  head/security/clamav/Makefile
  head/security/clamav/files/clamav-clamd.in
  head/security/clamav/files/clamav-freshclam.in
  head/security/clamav/files/clamav-milter.in

Modified: head/security/clamav-devel/Makefile
==============================================================================
--- head/security/clamav-devel/Makefile	Mon May  5 14:36:43 2014	(r353007)
+++ head/security/clamav-devel/Makefile	Mon May  5 14:38:17 2014	(r353008)
@@ -3,6 +3,7 @@
 
 PORTNAME=	clamav
 PORTVERSION=	20140107
+PORTREVISION=	1
 CATEGORIES=	security
 MASTER_SITES=	http://www.clamav.net/snapshot/ \
 		LOCAL/garga/clamav-devel

Modified: head/security/clamav-devel/files/clamav-clamd.in
==============================================================================
--- head/security/clamav-devel/files/clamav-clamd.in	Mon May  5 14:36:43 2014	(r353007)
+++ head/security/clamav-devel/files/clamav-clamd.in	Mon May  5 14:38:17 2014	(r353008)
@@ -3,7 +3,7 @@
 # $FreeBSD$
 #
 
-# PROVIDE: clamd
+# PROVIDE: clamav_clamd
 # REQUIRE: LOGIN
 # BEFORE: mail
 # KEYWORD: shutdown
@@ -22,30 +22,27 @@
 name=clamav_clamd
 rcvar=clamav_clamd_enable
 
-command=%%PREFIX%%/sbin/clamd
-required_dirs=%%DBDIR%%
-required_files=%%PREFIX%%/etc/clamd.conf
-
 # read settings, set default values
 load_rc_config "$name"
-: ${clamav_clamd_enable="NO"}
+
+: ${clamav_clamd_enable:=NO}
 : ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
 
+command=%%PREFIX%%/sbin/clamd
+required_dirs=%%DBDIR%%
+required_files=%%PREFIX%%/etc/clamd.conf
+
 start_precmd=clamav_clamd_precmd
+extra_commands=reload
+reload_cmd="%%PREFIX%%/bin/clamdscan --reload"
 
-clamav_clamd_precmd() {
+#clamav .93 won't start without a valid main.c[vl]d file
+clamav_clamd_precmd()
+{
 	if [ ! -f %%DBDIR%%/main.cvd -a ! -f %%DBDIR%%/main.cld ];then
 		echo "Missing %%DBDIR%%/*.cvd or *.cld files.  You must run freshclam first"
 		exit 1
 	fi
 }
 
-extra_commands="reload"
-reload_cmd=clamd_reload
-
-clamd_reload()
-{
-  %%PREFIX%%/bin/clamdscan --reload
-}
-
 run_rc_command "$1"

Modified: head/security/clamav-devel/files/clamav-freshclam.in
==============================================================================
--- head/security/clamav-devel/files/clamav-freshclam.in	Mon May  5 14:36:43 2014	(r353007)
+++ head/security/clamav-devel/files/clamav-freshclam.in	Mon May  5 14:38:17 2014	(r353008)
@@ -3,7 +3,7 @@
 # $FreeBSD$
 #
 
-# PROVIDE: freshclam
+# PROVIDE: clamav_freshclam
 # REQUIRE: LOGIN clamd
 # BEFORE: mail
 # KEYWORD: shutdown
@@ -22,14 +22,14 @@
 name=clamav_freshclam
 rcvar=clamav_freshclam_enable
 
+load_rc_config ${name}
+
+: ${clamav_freshclam_enable:=NO}
+
 command=%%PREFIX%%/bin/freshclam
 pidfile=%%RUNDIR%%/freshclam.pid
 command_args="--daemon -p ${pidfile}"
 required_dirs=%%DBDIR%%
 required_files=%%PREFIX%%/etc/freshclam.conf
 
-# read settings, set default values
-load_rc_config "$name"
-: ${clamav_freshclam_enable="NO"}
-
 run_rc_command "$1"

Modified: head/security/clamav-devel/files/clamav-milter.in
==============================================================================
--- head/security/clamav-devel/files/clamav-milter.in	Mon May  5 14:36:43 2014	(r353007)
+++ head/security/clamav-devel/files/clamav-milter.in	Mon May  5 14:38:17 2014	(r353008)
@@ -3,7 +3,7 @@
 # $FreeBSD$
 #
 
-# PROVIDE: clamav-milter
+# PROVIDE: clamav_milter
 # REQUIRE: LOGIN clamd
 # BEFORE: mail
 # KEYWORD: shutdown
@@ -11,7 +11,7 @@
 #
 # Add the following lines to /etc/rc.conf to enable clamav-milter:
 #
-#clamav_milter_enable="YES"
+# clamav_milter_enable="YES"
 #
 # See clamav-milter(1) for flags
 #
@@ -21,6 +21,18 @@
 name=clamav_milter
 rcvar=clamav_milter_enable
 
+load_rc_config $name
+
+: ${clamav_milter_enable:=NO}
+: ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"}
+: ${clamav_milter_flags="-c ${conf_file}"}
+: ${clamav_milter_socktimeout=60}
+: ${clamav_milter_socket_mode=777}
+: ${clamav_milter_socket_user=%%CLAMAVUSER%%}
+: ${clamav_milter_socket_group=%%CLAMAVGROUP%%}
+: ${clamav_clamd_enable:=NO}
+: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
+
 conf_file=%%PREFIX%%/etc/clamav-milter.conf
 command=%%PREFIX%%/sbin/clamav-milter
 required_dirs=%%DBDIR%%
@@ -89,17 +101,4 @@ start_postcmd()
 	fi
 }
 
-# read settings, set default values
-load_rc_config $name
-: ${clamav_milter_enable="NO"}
-: ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"}
-: ${clamav_milter_flags="-c ${conf_file}"}
-: ${clamav_milter_socktimeout="60"}
-: ${clamav_milter_socket_mode="777"}
-: ${clamav_milter_socket_user="%%CLAMAVUSER%%"}
-: ${clamav_milter_socket_group="%%CLAMAVGROUP%%"}
-
-: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
-: ${clamav_clamd_enable="NO"}
-
 run_rc_command "$1"

Modified: head/security/clamav/Makefile
==============================================================================
--- head/security/clamav/Makefile	Mon May  5 14:36:43 2014	(r353007)
+++ head/security/clamav/Makefile	Mon May  5 14:38:17 2014	(r353008)
@@ -3,7 +3,7 @@
 
 PORTNAME=	clamav
 PORTVERSION=	0.98.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security
 MASTER_SITES=	SF
 

Modified: head/security/clamav/files/clamav-clamd.in
==============================================================================
--- head/security/clamav/files/clamav-clamd.in	Mon May  5 14:36:43 2014	(r353007)
+++ head/security/clamav/files/clamav-clamd.in	Mon May  5 14:38:17 2014	(r353008)
@@ -3,7 +3,7 @@
 # $FreeBSD$
 #
 
-# PROVIDE: clamd
+# PROVIDE: clamav_clamd
 # REQUIRE: LOGIN
 # BEFORE: mail
 # KEYWORD: shutdown
@@ -22,31 +22,27 @@
 name=clamav_clamd
 rcvar=clamav_clamd_enable
 
-command=%%PREFIX%%/sbin/clamd
-required_dirs=%%DBDIR%%
-required_files=%%PREFIX%%/etc/clamd.conf
-
 # read settings, set default values
 load_rc_config "$name"
-: ${clamav_clamd_enable="NO"}
+
+: ${clamav_clamd_enable:=NO}
 : ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
 
+command=%%PREFIX%%/sbin/clamd
+required_dirs=%%DBDIR%%
+required_files=%%PREFIX%%/etc/clamd.conf
+
 start_precmd=clamav_clamd_precmd
+extra_commands=reload
+reload_cmd="%%PREFIX%%/bin/clamdscan --reload"
 
 #clamav .93 won't start without a valid main.c[vl]d file
-clamav_clamd_precmd() {
+clamav_clamd_precmd()
+{
 	if [ ! -f %%DBDIR%%/main.cvd -a ! -f %%DBDIR%%/main.cld ];then
 		echo "Missing %%DBDIR%%/*.cvd or *.cld files.  You must run freshclam first"
 		exit 1
 	fi
 }
 
-extra_commands="reload"
-reload_cmd=clamd_reload
-
-clamd_reload()
-{
-  %%PREFIX%%/bin/clamdscan --reload
-}
-
 run_rc_command "$1"

Modified: head/security/clamav/files/clamav-freshclam.in
==============================================================================
--- head/security/clamav/files/clamav-freshclam.in	Mon May  5 14:36:43 2014	(r353007)
+++ head/security/clamav/files/clamav-freshclam.in	Mon May  5 14:38:17 2014	(r353008)
@@ -3,7 +3,7 @@
 # $FreeBSD$
 #
 
-# PROVIDE: freshclam
+# PROVIDE: clamav_freshclam
 # REQUIRE: LOGIN clamd
 # BEFORE: mail
 # KEYWORD: shutdown
@@ -22,14 +22,14 @@
 name=clamav_freshclam
 rcvar=clamav_freshclam_enable
 
+load_rc_config ${name}
+
+: ${clamav_freshclam_enable:=NO}
+
 command=%%PREFIX%%/bin/freshclam
 pidfile=%%RUNDIR%%/freshclam.pid
 command_args="--daemon -p ${pidfile}"
 required_dirs=%%DBDIR%%
 required_files=%%PREFIX%%/etc/freshclam.conf
 
-# read settings, set default values
-load_rc_config "$name"
-: ${clamav_freshclam_enable="NO"}
-
 run_rc_command "$1"

Modified: head/security/clamav/files/clamav-milter.in
==============================================================================
--- head/security/clamav/files/clamav-milter.in	Mon May  5 14:36:43 2014	(r353007)
+++ head/security/clamav/files/clamav-milter.in	Mon May  5 14:38:17 2014	(r353008)
@@ -3,7 +3,7 @@
 # $FreeBSD$
 #
 
-# PROVIDE: clamav-milter
+# PROVIDE: clamav_milter
 # REQUIRE: LOGIN clamd
 # BEFORE: mail
 # KEYWORD: shutdown
@@ -11,7 +11,7 @@
 #
 # Add the following lines to /etc/rc.conf to enable clamav-milter:
 #
-#clamav_milter_enable="YES"
+# clamav_milter_enable="YES"
 #
 # See clamav-milter(1) for flags
 #
@@ -21,6 +21,18 @@
 name=clamav_milter
 rcvar=clamav_milter_enable
 
+load_rc_config $name
+
+: ${clamav_milter_enable:=NO}
+: ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"}
+: ${clamav_milter_flags="-c ${conf_file}"}
+: ${clamav_milter_socktimeout=60}
+: ${clamav_milter_socket_mode=777}
+: ${clamav_milter_socket_user=%%CLAMAVUSER%%}
+: ${clamav_milter_socket_group=%%CLAMAVGROUP%%}
+: ${clamav_clamd_enable:=NO}
+: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
+
 conf_file=%%PREFIX%%/etc/clamav-milter.conf
 command=%%PREFIX%%/sbin/clamav-milter
 required_dirs=%%DBDIR%%
@@ -89,17 +101,4 @@ start_postcmd()
 	fi
 }
 
-# read settings, set default values
-load_rc_config $name
-: ${clamav_milter_enable="NO"}
-: ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"}
-: ${clamav_milter_flags="-c ${conf_file}"}
-: ${clamav_milter_socktimeout="60"}
-: ${clamav_milter_socket_mode="777"}
-: ${clamav_milter_socket_user="%%CLAMAVUSER%%"}
-: ${clamav_milter_socket_group="%%CLAMAVGROUP%%"}
-
-: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
-: ${clamav_clamd_enable="NO"}
-
 run_rc_command "$1"


More information about the svn-ports-all mailing list