From: Fumitoshi UKAI <ukai@debian.or.jp>
To: linux-hotplug@vger.kernel.org
Subject: ifdown on unregister for debian system
Date: Mon, 07 Jan 2002 17:07:09 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-101042335418693@msgid-missing> (raw)
Hi, I'm linux-hotplug debian package maintainer.
On debian system, ifup/ifdown keep status of interface status (up/down)
in ifstate database, so ifdown is necessary when network interface
unregistered. Unless ifdown is called, next registering net device
will fail because it was already up in ifstate database.
--- hotplug-0.0.20010919.orig/etc/hotplug/net.agent
+++ hotplug-0.0.20010919/etc/hotplug/net.agent
@@ -9,6 +9,7 @@
#
# HISTORY:
#
+# 30-Sep-2001 ifdown on unregister for debian system
# 25-Feb-2001 Special case ppp and similar (redhat)
# 23-Jan-2001 Log invocation of "ifup" if debugging
# 04-Jan-2001 Initial version of "new" hotplug agent.
@@ -45,13 +46,27 @@
debug_mesg invoke ifup $INTERFACE
exec /sbin/ifup $INTERFACE
else
- mesg "how do I bring interfaces up on this distro?"
+ # mesg "how do I bring interfaces up on this distro?"
+ mesg "E: /sbin/ifup not found. You need to install ifupdown package"
fi
;;
esac
mesg $1 $ACTION event not handled
;;
+unregister)
+ # Assume that we want to run ifdown no matter what,
+ # because it's not going to remove the data from the
+ # ifstate database otherwise.
+ if [ -x /sbin/ifdown ]; then
+ debug_mesg invoke ifdown $INTERFACE
+ exec /sbin/ifdown $INTERFACE
+ else
+ # mesg "how do I bring interfaces up on this distro?"
+ mesg "E: /sbin/ifdown not found. You need to install ifupdown package"
+ fi
+ mesg $1 $ACTION event not handled
+ ;;
*)
debug_mesg NET $ACTION event not supported
exit 1 ;;
Regards,
Fumitoshi UKAI
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next reply other threads:[~2002-01-07 17:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-07 17:07 Fumitoshi UKAI [this message]
2002-01-07 17:36 ` ifdown on unregister for debian system Bill Nottingham
2002-01-07 17:41 ` Fumitoshi UKAI
2002-01-07 17:44 ` Bill Nottingham
2002-01-07 17:59 ` David Brownell
2002-01-07 18:05 ` David Brownell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-hotplug-101042335418693@msgid-missing \
--to=ukai@debian.or.jp \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).