cgred init script references wrong default file and uses bad options
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libcgroup (Ubuntu) |
Fix Released
|
High
|
Serge Hallyn | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned | ||
Maverick |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
=======
SRU Justification:
1. Impact: startup modifications specified in /etc/default/
2. How bug was addressed: the cgred init file is fixed.
3. Patch: see attached debdiff.
4. TEST CASE: add 'LOG_FILE=
5. Regression potential: if people have updated their /etc/default/cgred with errors, which had up to now been ignored, then those errors would now be seen.
=======
The /etc/init.d/cgred startup script looks for the file /etc/default/
Additionally, the script makes no use of the DAEMON_OPTS variable found in the default file.
Lastly, the log file parameter as provided won't work. (the daemon exits with a usage error) One has to use the -f option instead of --log-file in order for the daemon to start.
It might be good to document LOG_FILE via a comment in /etc/default/cgred.
-if [ -f "/etc/default/
- . /etc/default/
- OPTIONS="$NODAEMON $LOG"
+if [ -f "/etc/default/
+ . /etc/default/cgred
+ OPTIONS="$NODAEMON $LOG $DAEMON_OPTS"
if [ -n "$LOG_FILE" ]; then
- OPTIONS="$OPTIONS --log-file=
+ OPTIONS="$OPTIONS -f $LOG_FILE"
fi
tags: | added: testcase |
Thanks for taking the time to report this bug.
It was fixed (inadvertently) in natty and oneiric with the switch to upstart. However the bugs are present in lucid and maverick.