logrotate, syslog, and chsh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]




I'm noticing that logrotate's default configuration for rotating /var/ log/secure and /var/log/messages partially fails if root's shell is set to /bin/tcsh (via chsh). (Running on CentOS 4.4; logrotate-3.7.1-5.RHEL4).

What seems to be happening is that the logrotate.d/syslog postrotate command runs: /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true

Under bash, this redirects stderr to /dev/null. Under tcsh, this produces the error:
	cat: 2: No such file or directory

What happens in this scenario is that the log gets rotated, but syslogd does not receive the SIGHUP, so nothing gets logged, at all. (i.e. secure and messages are 0 bytes until syslog is kicked).

I'm just going to set the default shell for root back to bash, but I wanted to ask the list if there is any general "rule of thumb" that root's shell should be bash?

best,
Jeff
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux