Re: Hi I'm new here and Enter/Exit hooks
Roy Marples
Mon Aug 31 21:33:33 2009
On Sunday 30 August 2009 20:52:31 Christ Schlacta wrote:
> Hallo, I'm here with somewhat of a bug/feature request. this is my
> first time posting to the list, so I thought I should say Hi first. my
> name is Christ, and I've been using dhcpcd for a long time now in favor
> of dhclient which I despise.
Welcome :)
> I've run into one severely annoying
> feature just recently.. dhcpcd.enter-hook and dhcpcd.exit-hook. I
> believe they should be directories, containing numbered scripts. in
> reading the documentation, that's what I originally thought they were,
> and was frustrated for days wondering why my scripts weren't running.
>
> Ultimately, I think the enter/exit hooks files should be removed and
> replaced with a single /etc/dhcpcd-hooks directory and the
> dhcpcd-run-hooks script should be updated to go through the scripts in
> each directory in numerical order. that would allow adding multiple
> user hooks in the /etc directory and wouldn't eliminate current
> functionality of the hooks system if users rename their files as such:
> mv /etc/dhcpcd.enter-hook /etc/dhcpcd-hooks/000-whatever and mv
> /etc/dhcpcd.exit-hook /etc/dhcpcd-hooks/999-whatever.
>
> as I have an enter and an exit hook already, I fear what may come when I
> need to write a third hook
There is a directory for numerically ordered scripts - /libexec/dhcpcd-hooks,
or /lib/dhcpcd/dhcpcd-hooks depending on packaging.
They are meant for system hooks.
The enter and exit hooks are for user hooks. As the user is assumed to be in
complete control of their own hooks a directory is not really needed as the
order is controlled within the hook itself.
I think a directory would over complicate matters. You can always script a
hook directory in the enter/exit hooks if you so wish.
Thanks
Roy
Archive administrator: postmaster@marples.name