Bug 2409 - ifdown-pre hook
Summary: ifdown-pre hook
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: net-scripts (show other bugs)
Version: unstable
Hardware: all Linux
: P5 enhancement
Assignee: Denis Ovsienko
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-23 14:44 MSK by imz
Modified: 2004-12-23 13:42 MSK (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description imz 2003-03-23 14:44:09 MSK
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 Denis Ovsienko 2004-03-17 22:26:21 MSK
взял
Comment 2 Denis Ovsienko 2004-03-22 13:49:06 MSK
Резонно, скорее всего сделаю.
Comment 3 Denis Ovsienko 2004-05-22 16:54:51 MSD
Пошло в 0.4.8