A hook for a script that is run before an interface is brought down can be useful (in /sbin/ifdown). ifdown-pre is symmetric to ifup-post script (which is supported). This hook can be used to perform some kind of de-registration actions in the net, or to stop some processes that have been monitoring the corresponding link (started in ifup-post). --- --- I implemented it like this: --- /sbin/ifdown.orig 2001-03-04 17:19:07 +0300 +++ /sbin/ifdown 2002-05-19 16:32:21 +0400 @@ -78,6 +78,8 @@ \"$DHCPCD\" -k \"$DEVICE\" fi +/etc/sysconfig/network-scripts/ifdown-pre \"$DEVICE\" || exit 1 + ifconfig \"$DEVICE\" down [ \"$retcode\" = \"0\" ] && retcode=$? I found also another implementation by RH: <a href="http://rhlinux.redhat.com/cgi-bin/cvsweb.cgi/initscripts/sysconfig/network-scripts/ifdown.diff?r1=1.10&r2=1.10.2.1">http://rhlinux.redhat.com/cgi-bin/cvsweb.cgi/initscripts/sysconfig/network-scripts/ifdown.diff?r1=1.10&r2=1.10.2.1</a> initscripts-5.49-ipl52mdk
взял
Резонно, скорее всего сделаю.
Пошло в 0.4.8