Bug 145933 - logrotate fails when root shell != bash
logrotate fails when root shell != bash
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: logrotate (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-24 02:44 EST by Herrick, Andrew
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-16 03:51:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Herrick, Andrew 2005-01-24 02:44:14 EST
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 08:10:46 EST
I can't reproduce it.
It looks like bug #146597.

Note You need to log in before you can comment on or make changes to this bug.