rpms/spamassassin/devel sa-update.cronscript, 1.9, 1.10 spamassassin.spec, 1.154, 1.155
Warren Togami 砥上勇
wtogami at fedoraproject.org
Sun Jan 24 20:07:16 UTC 2010
Author: wtogami
Update of /cvs/pkgs/rpms/spamassassin/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10805
Modified Files:
sa-update.cronscript spamassassin.spec
Log Message:
Fix update script to avoid error if .conf files are in CWD (thanks nirik!)
Index: sa-update.cronscript
===================================================================
RCS file: /cvs/pkgs/rpms/spamassassin/devel/sa-update.cronscript,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- sa-update.cronscript 14 Jan 2010 22:29:40 -0000 1.9
+++ sa-update.cronscript 24 Jan 2010 20:07:16 -0000 1.10
@@ -5,28 +5,6 @@
# Place files here to add custom channels.
#
-# list files in a directory consisting only of alphanumerics, hyphens and
-# underscores
-# $1 - directory to list
-# $2 - optional suffix to limit which files are selected
-run_parts_list() {
- if [ $# -lt 1 ]; then
- echo "ERROR: Usage: run_parts_list <dir>" > /dev/stderr
- exit 1
- fi
- if [ ! -d "$1" ]; then
- echo "ERROR: Not a directory: $1" > /dev/stderr
- exit 1
- fi
-
- if [ -d "$1" ]; then
- if [ -n "$2" ]; then
- find_opts='-name *'$2
- fi
- find -L $1 -mindepth 1 -maxdepth 1 -type f $find_opts | sort -n
- fi
-}
-
# Proceed with sa-update if spam daemon is running or forced in /etc/sysconfig/sa-update
unset SAUPDATE
[ -f /etc/sysconfig/sa-update ] && . /etc/sysconfig/sa-update
@@ -48,7 +26,7 @@ fi
CHANNELLIST=""
KEYLIST=""
# Process each channel defined in /etc/mail/spamassassin/channel.d/
-for file in $(run_parts_list /etc/mail/spamassassin/channel.d/ .conf); do
+for file in $(find -L /etc/mail/spamassassin/channel.d/ -mindepth 1 -maxdepth 1 -type f -name '*.conf'); do
# Validate config file
PREFIXES="CHANNELURL KEYID BEGIN"
for prefix in $PREFIXES; do
Index: spamassassin.spec
===================================================================
RCS file: /cvs/pkgs/rpms/spamassassin/devel/spamassassin.spec,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -p -r1.154 -r1.155
--- spamassassin.spec 21 Jan 2010 17:03:24 -0000 1.154
+++ spamassassin.spec 24 Jan 2010 20:07:16 -0000 1.155
@@ -264,6 +264,9 @@ fi
exit 0
%changelog
+* Sun Jan 24 2010 Warren Togami <wtogami at redhat.com> - 3.3.0-3
+- Fix update script to avoid error if .conf files are in CWD (thanks nirik!)
+
* Thu Jan 21 2010 Warren Togami <wtogami at redhat.com> - 3.3.0-2
- 3.3.0 (really this time!)
- README.RHEL.Fedora
More information about the scm-commits
mailing list