Systemd unit file: Can/Should ExecStart and ExecStop run a script?

Richard Shaw hobbes1069 at gmail.com
Fri Oct 21 17:42:43 UTC 2011


On Fri, Oct 21, 2011 at 11:44 AM, Toshio Kuratomi <a.badger at gmail.com> wrote:
> On Wed, Oct 19, 2011 at 06:53:12PM -0500, Richard Shaw wrote:
>> You're right, an ACL approach may be better. But my sql-fu isn't
>> really up to the task. For this to work:
>>
>> 1. mysqld would have to be running.
>> 2. I would have to source /etc/mythtv/mysql.txt to get the variables
>> (DBHostname, DBUserName, DBPassword, and DBName)
>> 3. Call mysql from the commandline, query the DBName for the recording
>> group path(s)
>> 4. setfacl -m u:mythtv:rw -R /path1 /path2 /path3 /path[n]...
>>
>> And I'd have to do all this in a failsafe way from %pre without any
>> user interaction...
>>
>> Ack!
>>
> Don't do this.  You're breaking assumptions about what can be expected that
> an rpm is going to do when you go this far.  Suppose that an end user has
> explicitly changed the recordings from mythtv user to root.  This suddenly
> allows the mythtv backend user to access those files again.

I wasn't planning on it :) Just enumerating what would be necessary if
I wanted to do ot.

> The standard way to enable this would be to write a script or simply
> instructions and put it in the documenation directory.  Then blog, write in
> release notes (rpmfusion doesn't have release notes that I know of so....)
> etc about the migration issue and that users who want to can run the script
> or follow the instructions to get things converted.

That's pretty much my plan. I started a wiki page for myth at:

http://rpmfusion.org/Package/mythtv

and put it in the changelog.

I also will post to the rpmfusion and mythtv user lists once I'm ready
to push builds.

Thanks,
Richard


More information about the devel mailing list