sorry
this is the new patch
diff --git a/apticron b/apticron
index fdb9e5a..aa01806 100755
--- a/apticron
+++ b/apticron
@@ -94,12 +94,6 @@ DISTRIB_ID="Debian"    # Default to Debian
 # Source the config file
 [ -e /etc/apticron/apticron.conf ] && . /etc/apticron/apticron.conf
 
-if [ -n "$CUSTOM_SUBJECT" ] ; then
-	MAILX_SUBJECT="$CUSTOM_SUBJECT"
-else
-	MAILX_SUBJECT="$DISTRIB_ID package update(s) for $SYSTEM"
-fi
-
 if [ -z "$IPADDRESSES" ] && [ -x /sbin/ip ]; then
 	# Set the IPv4 addresses
 	IPADDRESSES=`(echo $( /bin/hostname -i ) ;
@@ -170,6 +164,13 @@ fi
 
 NUM_PACKAGES=`echo $PKGNAMES |wc -w`
 
+if [ -n "$CUSTOM_SUBJECT" ] ; then
+	MAILX_SUBJECT=$(eval 'echo "${CUSTOM_SUBJECT}"')
+else
+	MAILX_SUBJECT="$NUM_PACKAGES $DISTRIB_ID package update(s) for $SYSTEM"
+fi
+
+
 # packages already reported won't be reported again if DIFF_ONLY option is marked
 LAST_RUN_FILE="/var/lib/apticron/last_run"
 if [ "$DIFF_ONLY" = "1" ] && [ -e "$LAST_RUN_FILE" ]; then
@@ -279,7 +280,7 @@ EOF
 apticron
 EOF
 
-   ) 2>&1 | Mailx -s "$NUM_PACKAGES $MAILX_SUBJECT" $EMAIL
+   ) 2>&1 | Mailx -s "$MAILX_SUBJECT" $EMAIL
 
 fi
 

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Reply via email to