Bug 2409 - ifdown-pre hook
: ifdown-pre hook
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/net-scripts)
: unstable
: all Linux
: P5 enhancement
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2003-03-23 14:44 by
Modified: 2004-12-23 13:42 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2003-03-23 14:44:09
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&amp;r2=1.10.2.1">http://rhlinux.redhat.com/cgi-bin/cvsweb.cgi/initscripts/sysconfig/network-scripts/ifdown.diff?r1=1.10&amp;r2=1.10.2.1</a>

initscripts-5.49-ipl52mdk
------- Comment #1 From 2004-03-17 22:26:21 -------
взял
------- Comment #2 From 2004-03-22 13:49:06 -------
Резонно, скорее всего сделаю.
------- Comment #3 From 2004-05-22 16:54:51 -------
Пошло в 0.4.8