auto expire not working in mythtv
This is my first post on LQ. Please correct and forgive me if my post's format is wrong.
I'm running Fedora Core 4 and I installed mythtv with yum from the atrpms repository.
I realized that my tv program were not auto expiring. In case you don't know, 'auto expire' is a feature where mythtv will automatically delete old records in order to free up disk space. Without it working, my disk filled up and I couldn't record new programs.
With some trial and error, I discovered that mythtv would only delete files owned by the mythtv account. The problem is that the mythtv backend runs as root and leaves its owner as root on the recorded files. I think this is a bug; if it will only delete files owned by mythtv, it should change the owner to mythtv.
As a workaround, I proceeded to figure out how to get the backend to run as the mythtv user. This is inside the standard /etc/init.d/mythbackend that came from yum:
# Does not work on Red Hat, do to to missing audio/video groups.
# cd $MYTHTV_HOME && daemon --user mythtv $binary $OPTIONS
cd $MYTHTV_HOME && daemon $binary $OPTIONS
Sure enough, if the backend is run as mythtv, it doesn't have access to /dev/audio or /dev/video0. The permissions are crw------- root root. It seems like udev is the correct place to change these permissions. I editted /etc/udev/rules.d/50-udev.urules for the dsp, audio, and video lines like this:
KERNEL=="dsp*", GROUP="mythtv", MODE="0660"
The part I can't figure out is that once the computer is booted up, if I rmmod and modprobe my capture card, video0 has group mythtv. Unfortunately, if I just boot up my computer, video0 still has root as its group. If I then run udevstart, it gets switched. I find it hard to believe that udev isn't properly started in Fedora. Did I make my change in the wrong place?
As a work around, I run udevstart from the mythbackend init script before I start the backend as mythtv.
|