summaryrefslogtreecommitdiff
path: root/openembedded/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2005-08-31 10:45:47 +0000
committerRichard Purdie <richard@openedhand.com>2005-08-31 10:45:47 +0000
commit4b46c1f6e891b1ddd5968536440b888661fade3e (patch)
treee0ba2c1f56f61b868bf746da5c4feabb25b800b2 /openembedded/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent
downloadopenembedded-core-4b46c1f6e891b1ddd5968536440b888661fade3e.tar.gz
openembedded-core-4b46c1f6e891b1ddd5968536440b888661fade3e.tar.bz2
openembedded-core-4b46c1f6e891b1ddd5968536440b888661fade3e.tar.xz
openembedded-core-4b46c1f6e891b1ddd5968536440b888661fade3e.zip
Initial population
git-svn-id: https://svn.o-hand.com/repos/poky@1 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent')
-rw-r--r--openembedded/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent29
1 files changed, 29 insertions, 0 deletions
diff --git a/openembedded/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent b/openembedded/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent
new file mode 100644
index 000000000..3bc093501
--- /dev/null
+++ b/openembedded/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent
@@ -0,0 +1,29 @@
+#!/bin/sh -e
+#
+# Since ifupdown of Debian is different than one of RedHat.
+# So we need to fix it
+
+topdir=$1
+dir=$topdir/etc/hotplug
+test -f $dir/net.agent || exit 1
+mv $dir/net.agent $dir/net.agent.orig
+
+sed -e '/^\*)/i\
+unregister)\
+ # Assume that we want to run ifdown no matter what, \
+ # because it is 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\
+ ;;\
+' $dir/net.agent.orig > $dir/net.agent
+rm -f $dir/net.agent.orig
+chmod 755 $dir/net.agent
+exit 0
+