Package: cron-apt Version: 0.4.14 Severity: wishlist Tags: patch The attached patch modifies config.d semantics so that variables set in config.d are only honored for the corresponding action.d item while returning to the default read in from the config file for the next action.d item.
This feels much more natural, to me at least. --- cron-apt.orig 2007-07-31 23:02:57.000000000 +0200 +++ cron-apt 2007-07-31 23:09:48.000000000 +0200 @@ -459,6 +459,12 @@ # Always run onexit before exit. for ACTION in $(run_parts "$ACTIONDIR") ; do + SAVE_SYSLOGON="$SYSLOGON" + SAVE_MAILON="$MAILON" + SAVE_DEBUG="$DEBUG" + SAVE_EXITON="$EXITON" + SAVE_DIFFIGNORE="$DIFFIGNORE" + SAVE_DIFFONCHANGES="$DIFFONCHANGES" ACTIONF=$(echo $ACTION | sed "s|$ACTIONDIR/||") if [ -f "$ACTIONCONFDIR/$ACTIONF" ] ; then . "$ACTIONCONFDIR/$ACTIONF" @@ -606,6 +612,12 @@ fi rm -f "$STATUS" fi + SYSLOGON="$SAVE_SYSLOGON" + MAILON="$SAVE_MAILON" + DEBUG="$SAVE_DEBUG" + EXITON="$SAVE_EXITON" + DIFFIGNORE="$SAVE_DIFFIGNORE" + DIFFONCHANGES="$SAVE_DIFFONCHANGES" done onexit A different way to implement would mean having suffixes for the variable name in config.d, either FOO_FROMHERE to replace FOO's value for the rest of the cron-apt run, or FOO_HERE to only replace FOO's value for thi action.d item. Please indicate which way you'd prefer, and I'll send a modified patch. I do think that the patch listed above is the easiest one. Greetings Marc -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]