[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: better /etc/init.d/network



Massimo Dal Zotto <dz@cs.unitn.it> writes:

> With my net script you can do that. Put your extra commands in the net_up()
> and net_down() functions of each config file and they will be executed
> automatically by the net command.
> 
> Maybe we could handle also before_net_up() and after_net_down() functions.
> If someone needs them I will think about adding these functionalities.

How about if you had files which would be executed before and after
the interface it brought up, and before or after the interface is
brought down.

/etc/network/eth0.preup
/etc/network/eth0.postup
/etc/network/eth0.predown
/etc/network/eth0.postdown

This would make is easier for programs like ipmasq or leafnode or
whatever to put hooks to start themselves up or shut themselves down
as an itnerface goes up or down.  Perhaps we even do soemthing like:

/etc/network/eth0.postup.leafnode
/etc/network/eth0.postup.fetchmail

So that this hooks could be added and removed as the packages are
added and removed without effecting other packages.

I think that the naming conventions could use some work tho.

-- 
Craig Brozefsky        <craig@red-bean.com>
Less matter, more form!      - Bruno Schulz
ignazz, I am truly korrupted by yore sinful tzourceware. -jb
The Osmonds! You are all Osmonds!! Throwing up on a freeway at dawn!!!


Reply to: