* Joey Hess 

| Hmm, you might have to do something mildly tricky with the limits stuff;
| if the user did not turn it on you would have to manage
| commenting/uncommenting the lines in the config file. Still seems quite
| doable.

    db_get mailman/gate_news || true
    if [ "$RET" = "no" ]; then
        # Comment out any lines containing the words "gate_news"
        awk '/^[^#]*gate_news/ { print "# " $LINE;next }; //' < 
/etc/cron.d/mailman > /etc/cron.d/mailman.$$
    else
        # Remove commenting of any lines containing gate_news
        awk '/^[ \t]*#.*gate_news/ { sub(/^[ \t]*#[ \t]*/, ""); print; next }; 
//' < /etc/cron.d/mailman > /etc/cron.d/mailman.$$
    fi

is what I use in mailman for commenting and uncommenting lines in the
postinst.  It seems to work, but kinda sucks.

(If anybody feels like reviewing the debconf usage in mailman, feel
free. :)

-- 
Tollef Fog Heen                                                        ,''`.
UNIX is user friendly, it's just picky about who its friends are      : :' :
                                                                      `. `' 
                                                                        `-  


Reply via email to