Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 235212 - sys-process/dcron-3.2: make log file configurable
Summary: sys-process/dcron-3.2: make log file configurable
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Cron Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-19 18:46 UTC by pa4wdh
Modified: 2009-05-12 20:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pa4wdh 2008-08-19 18:46:11 UTC
The current initscript for dcron has a hardcoded value for the logfile it should use (/var/log/cron.log). I wanted to change that behavior and decided to share my small change with the rest of the community.

My suggestion for start() section of the init script (sorry, can't make a proper patch now, but that's a whole different problem :-) ):
start() {
        ebegin "Starting dcron"
        /usr/sbin/crond ${DCRON_OPTS} >> ${DCRON_LOG} 2>&1
        eend $?
}

And of course the /etc/conf.d/dcron file should get the variable:
# /etc/conf.d/dcron

# Options to pass to dcron at startup
DCRON_OPTS=""

# Logfile to send log output to
# Default is /var/log/cron.log, set to /dev/null to disable logging
DCRON_LOG="/var/log/cron.log"

You might want to add some logic to the script to enforce a default in case the variable is unset.

Reproducible: Always

Steps to Reproduce:
Comment 1 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-05-12 20:59:28 UTC
this is now in cvs.
thanks.