** Description changed:

  /etc/cron.daily has a script called "logrotate" which will kick off
  logrotate. Before logrotate is executed, the script scans the logrotate
  status file, located in /var/lib/logrotate/status to search for non-
  existant files and remove them from the status file.
  
  This script is written in a way which assumes all log files will not
  have spaces in their name, causing logrotate not to be passed these log
  files for rotation. The sequence of events is:
  
  1) logrotate bash script starts, starting logrote, which looks into 
/etc/logrotate.d for logrotate configuration files. It inserts the relevant log 
file names into /var/lib/logrotate/status. On first detection of the log type, 
logrotate will not rotate the log.
- 2) One hour passed, and cron calls the logrotate bash script again. It scan 
/var/lib/logrotate/status for non-existant files. It is unable to parse a log 
file a space in the name, and assumes the log file does not exist. It then 
removes the log from the status file.
+ 2) One hour passed, and cron calls the logrotate bash script again. It scan 
/var/lib/logrotate/status for non-existant files. It is unable to parse a log 
file with a space in the name, and assumes the log file does not exist. It then 
removes the log from the status file.
  3) logrotate starts, and as it does not have an entry for the log, adds it 
back into the status file, but does not rotate (same as 1) )
  
  Attached is a patch - a replacement logrotate cron script.
  
  ---------
  
  Ubuntu Server 11.04 Natty x64
  logrotate 3.7.8-6ubuntu3.1
  cron 3.0pl1-116ubuntu1

** Description changed:

  /etc/cron.daily has a script called "logrotate" which will kick off
  logrotate. Before logrotate is executed, the script scans the logrotate
  status file, located in /var/lib/logrotate/status to search for non-
  existant files and remove them from the status file.
  
  This script is written in a way which assumes all log files will not
  have spaces in their name, causing logrotate not to be passed these log
  files for rotation. The sequence of events is:
  
  1) logrotate bash script starts, starting logrote, which looks into 
/etc/logrotate.d for logrotate configuration files. It inserts the relevant log 
file names into /var/lib/logrotate/status. On first detection of the log type, 
logrotate will not rotate the log.
- 2) One hour passed, and cron calls the logrotate bash script again. It scan 
/var/lib/logrotate/status for non-existant files. It is unable to parse a log 
file with a space in the name, and assumes the log file does not exist. It then 
removes the log from the status file.
+ 2) Once one hour has passed, cron calls the logrotate bash script again. It 
scan /var/lib/logrotate/status for non-existant files. It is unable to parse a 
log file with a space in the name, and assumes the log file does not exist. It 
then removes the log from the status file.
  3) logrotate starts, and as it does not have an entry for the log, adds it 
back into the status file, but does not rotate (same as 1) )
  
  Attached is a patch - a replacement logrotate cron script.
  
  ---------
  
  Ubuntu Server 11.04 Natty x64
  logrotate 3.7.8-6ubuntu3.1
  cron 3.0pl1-116ubuntu1

** Description changed:

  /etc/cron.daily has a script called "logrotate" which will kick off
  logrotate. Before logrotate is executed, the script scans the logrotate
  status file, located in /var/lib/logrotate/status to search for non-
  existant files and remove them from the status file.
  
  This script is written in a way which assumes all log files will not
  have spaces in their name, causing logrotate not to be passed these log
  files for rotation. The sequence of events is:
  
  1) logrotate bash script starts, starting logrote, which looks into 
/etc/logrotate.d for logrotate configuration files. It inserts the relevant log 
file names into /var/lib/logrotate/status. On first detection of the log type, 
logrotate will not rotate the log.
- 2) Once one hour has passed, cron calls the logrotate bash script again. It 
scan /var/lib/logrotate/status for non-existant files. It is unable to parse a 
log file with a space in the name, and assumes the log file does not exist. It 
then removes the log from the status file.
+ 2) Once one hour has passed, cron calls the logrotate bash script again. It 
scans /var/lib/logrotate/status for non-existant files. It is unable to parse a 
log file with a space in the name, and assumes the log file does not exist. It 
then removes the log from the status file.
  3) logrotate starts, and as it does not have an entry for the log, adds it 
back into the status file, but does not rotate (same as 1) )
  
  Attached is a patch - a replacement logrotate cron script.
  
  ---------
  
  Ubuntu Server 11.04 Natty x64
  logrotate 3.7.8-6ubuntu3.1
  cron 3.0pl1-116ubuntu1

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/932225

Title:
  logrotate cron script fails for logs with a space

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/932225/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to