Red Hat Bugzilla – Bug 145933
logrotate fails when root shell != bash
Last modified: 2007-11-30 17:10:59 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Description of problem:
Weekly log rotation script fails since I changed my root shell to
tcsh. I get the following message in my email every week:
error: error running shared postrotate script for /var/log/messages
/var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log
When I run the command in postrotate command in
/etc/logrotate.d/syslog using a bash -c it operates fine. Example:
bash -c '/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2>
No error is generated and the new file starts to get written to.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Change root shell 'chsh -s /bin/tcsh'
2. Wait for weekly log rotation to happen.
3. Get error in email.
Actual Results: Received error in email and logs were not properly
Expected Results: Logs should have been properly rotated.
I can't reproduce it.
It looks like bug #146597.