I am concerned that I may be incorrectly using the up
and down
interface options in /etc/network/interfaces
.
I was under the impression that these options were simply executed as a 'hook' after bringing the interface up or after taking it down.
However, reading a really good answer on SEU, I am now uncertain of what these options are really there for.
The manpage is not a great source of enlightenment either. I have read the manpage and think that I can pretty much put any command into the up
or down
option hooks but I would appreciate someone else to verify that.
Question
Would the following configuration be ok for an interface, specifically the up
and down
parts? Or is this interpretation wrong and prone to unexpected results?
allow-hotplug eth1
iface eth1 inet static
address 192.168.100.1
netmask 255.255.0.0
gateway 192.168.100.254
up ring_a_bell
down send_an_email
Where the ring_a_bell
and the send_an_email
just refer to any valid system command.