Upstart does not pass cmd line args to cron

Bug #700409 reported by terry b
This bug report is a duplicate of:  Bug #794082: cron ignores /etc/default/cron. Edit Remove
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cron (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: upstart

The defaults for cron are listed in /etc/default/cron. If I uncomment EXTRA_OPTS=" -L 2" in order to add additional logging to cron nothing happens when the process is restarted using service cron restart or service cron stop/start.

This occurs because the upstart command for cron exec's cron with no input from the default file.

Other services controlled by upstart may have the same issue.

If the defaults need to occur elsewhere then could the documentation be updated or a README in /etc/default be created with the correct process?

Description: Ubuntu 10.10
Release: 10.10

Patched current as of 1/8/2010

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: upstart 0.6.6-3
ProcVersionSignature: Ubuntu 2.6.35-24.42-generic 2.6.35.8
Uname: Linux 2.6.35-24-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Sat Jan 8 11:22:28 2011
InstallationMedia: Kubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
 LANGUAGE=
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: upstart

Revision history for this message
terry b (tbohaning-gmail) wrote :
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi terry, thanks for taking the time to file this bug report and help us make Ubuntu better.

I would agree that to cleanly support upgrades from older versions of Ubuntu, these default files should continue to be sourced and utilized.

Marked as Confirmed, Importance Low, tagged as regression-release.

tags: added: regression-release
Changed in upstart (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Steve Langasek (vorlon) wrote :

How is this a matter for the upstart package? It's the cron package that ships both the upstart job and the /etc/default/cron file; there's nothing upstart can do here to fix how /etc/init/cron.conf is written.

affects: upstart (Ubuntu) → cron (Ubuntu)
Revision history for this message
terry b (tbohaning-gmail) wrote :

Steve,

You're right. When I initially went thru the examples I didn't see anything except the exec command line. I've since found the script function and how to resolve the problem.

I've modified the script as follows:

# cron - regular background program processing daemon
#
# cron is a standard UNIX program that runs user-specified programs at
# periodic scheduled times

description "regular background program processing daemon"

start on runlevel [2345]
stop on runlevel [!2345]

expect fork
respawn

script
        . /etc/default/cron
        exec cron $LSBNAMES $EXTRA_OPTS
end script

This seems to address the problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.