package sn
tag 380240 patch
thanks

Hi,

please find attached a patch which fixes this bug.

I've removed the definition of EXPIRETIME from the 
file /etc/news/sn/debian-config, so that the only definition for that 
variable is found in /etc/cron.daily/sn.

To make sure that an accidentally left variable definition 
in /etc/news/sn/debian-config does not overwrite the definition 
in /etc/cron.daily/sn, I've also placed the EXPIRETIME variable after the 
sourcing of the debian-config file.

Regards,
Tobias

-- 
Tobias Toedter   | The sum of the intelligence of the world is constant.
Hamburg, Germany | The population is, of course, growing.
diff -ur sn-0.3.8.orig/debian/cron.daily sn-0.3.8/debian/cron.daily
--- sn-0.3.8.orig/debian/cron.daily	2006-08-07 21:49:14.000000000 +0200
+++ sn-0.3.8/debian/cron.daily	2006-08-07 21:51:58.000000000 +0200
@@ -2,9 +2,15 @@
 set -e
 cd /var/spool/sn
 
-EXPIRETIME=7d
+# Make sure that this line comes before the definition of EXPIRETIME.
+# Otherwise, the variable may accidentally be overwritten by the
+# file debian-config.
 test -f /etc/news/sn/debian-config && . /etc/news/sn/debian-config
 
+# Set the default value for the expire time.
+# See snexpire(8) for more information.
+EXPIRETIME=7d
+
 for f in *
 do
     case $f in
@@ -23,7 +29,7 @@
 		then
 		    /usr/sbin/snexpire -$EXPIRETIME $f
 		else
-		    echo "EXPIRETIME is not set correctly. See /etc/news/sn/debian-config" >&2
+		    echo "EXPIRETIME is not set correctly. See snexpire(8) for details." >&2
 		fi
 	    fi
 	    ;;
diff -ur sn-0.3.8.orig/debian/debian-config sn-0.3.8/debian/debian-config
--- sn-0.3.8.orig/debian/debian-config	2006-08-07 21:49:14.000000000 +0200
+++ sn-0.3.8/debian/debian-config	2006-08-07 21:49:30.000000000 +0200
@@ -1,6 +1,9 @@
 # How snget is run, manually, cron or ip-up
 RUNFROM=manually
-# The time for the expire.  See snexpire(8)
-EXPIRETIME=7d
+#
+# Please note that the variable EXPIRETIME has been removed
+# from this file. You can set the default value for your
+# expire time in the file /etc/cron.daily/sn.
+#
 # Set this to yes if you want to have a "Article posted successfully" report
 POSTINGREPORT=no

Attachment: pgp1Go7qKg2SA.pgp
Description: PGP signature

Reply via email to