Bug 145933

Summary: logrotate fails when root shell != bash
Product: [Fedora] Fedora Reporter: Ben Herrick <intrep>
Component: logrotateAssignee: Peter Vrabec <pvrabec>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-02-16 08:51:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ben Herrick 2005-01-24 07:44:14 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

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:

/etc/cron.daily/logrotate:

error: error running shared postrotate script for /var/log/messages
/var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log
/var/log/cron

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>
/dev/null'

No error is generated and the new file starts to get written to.

Version-Release number of selected component (if applicable):


How reproducible:
Always

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
rotated.

Expected Results:  Logs should have been properly rotated.

Additional info:

Comment 1 Peter Vrabec 2005-02-01 13:10:46 UTC
I can't reproduce it.
It looks like bug #146597.