position of the hook directries

Tobias Grimm pkg-vdr-dvb-devel@lists.alioth.debian.org
Thu, 21 Oct 2004 18:18:36 +0200


Hello!

Stefan-W. Hahn wrote:

>I think the position of the directories "command-hooks", "recording-hooks" and
>"shutdown-hooks" are not right. 
>So (see fhs) the right position seems /etc/vdr/ as it was
>in c't distro.
>
Only command-, recording- and shutdown-hooks, that are somehow 
"configurable", should go to /etc/vdr/xxx-hooks. All other hooks should 
be placed in /usr/share/vdr/xxx-hooks. The hooks in /etc/vdr/xxx-hooks 
will then have a link in /usr/share/vdr/xxx-hooks.

At least this is, what we had in mind. Putting everything under /etc 
would encourage the user to change these files, which would become a 
nightmare, when these files need to be upgraded.

> A second reason for that is the viewpoint of doing backups. For
>getting als configs of the installed vdr it must be taken a backup of
>/etc/default, /etc/vdr (or complete /etc) and /var/lib/vdr (or complete
>/var/lib), but all under /usr/share should be restorable by installing an new
>vdr from cdrom or via net.
>  
>
As I said, /usr/share/vdr/xxx-hooks contains only hooks, that are 
installed by other packages and that are not intended to be changed by 
the user. User-changeable hooks are still installed under /etc/vdr/... 
and will just have a link in/usr/share/...

Right now there aren't any packages, that install somthing to 
/etc/vdr/xxx-hooks. At least not in the Debian packages. That's why you 
probably don't see these directories in /etc/vdr. The new c't vdr (which 
uses the same directory structure now as the official Debian version!) 
has some packages, that do so. E.g. the noad addon installs the 
following files:

/etc/vdr/command-hooks/reccmds.noad.conf
/etc/vdr/recording-hooks/R10.noad
/usr/share/vdr/shutdown-hooks/S50.noad

and these links:

/etc/vdr/command-hooks/reccmds.noad.conf -> 
usr/share/vdr/command-hooks/reccmds.noad
/etc/vdr/recording-hooks/R10.noad -> /usr/share/vdr/recording-hooks/R10.noad

reccmds.noad.conf and R10.noad are editable by the user, because these 
files contain some configurable options. S50.noad contains nothing, that 
the user should ever change and therefore is not installed to /etc/vdr.

bye,

Tobias