Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 293464 - media-tv/mythtv logrotate throws error if mythbackend not running
Summary: media-tv/mythtv logrotate throws error if mythbackend not running
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: MythTV Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-17 07:56 UTC by Martin 'Douglas' Schuster
Modified: 2010-01-17 11:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin 'Douglas' Schuster 2009-11-17 07:56:11 UTC
/etc/logrotate.d/mythtv says

postrotate
/bin/kill -HUP `cat /var/run/mythbackend.pid`

which of course fails if mythbackend is not running, leading to weekly emails with an error message of cat (/var/run/mythbackend.pid: No such file or directory) and kill (which really wants to know which PID it's supposed to kill...)


Reproducible: Always

Steps to Reproduce:
1. Install mythtv
2. Don't add mythbackend to the default runlevel
3. Wait up to 1 week
4. Read you root-mailbox

Actual Results:  
Error mail "Subject: Cron <root@vihn1321> test -x /usr/sbin/run-crons && /usr/sbin/run-crons" received

Expected Results:  
No error mail :)

# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/files/mythtv.logrotate.d,v 1.2 2007/03/19 04:24:12 cardoe Exp $

=media-tv/mythtv-0.22_p22824-r1
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2010-01-04 05:40:49 UTC
Fixed in mythtv-0.22_p23069
Comment 2 Mark Clegg 2010-01-17 11:26:47 UTC
The new logrotate configuration in mythtv-0.22_p23069 reports a syntax error...

logrotate_script: line 1: [: missing `]'

Looks like a simple typo, the postrotate script needing a space inserting before the closing "]" to fix.

i.e.

[ -f "/var/run/mythbackend.pid" ] && /bin/kill -HUP `cat /var/run/mythbackend.pid`