summaryrefslogtreecommitdiffstats
path: root/meta/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent')
-rw-r--r--meta/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent29
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent b/meta/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent
new file mode 100644
index 0000000000..3bc0935018
--- /dev/null
+++ b/meta/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent
@@ -0,0 +1,29 @@
1#!/bin/sh -e
2#
3# Since ifupdown of Debian is different than one of RedHat.
4# So we need to fix it
5
6topdir=$1
7dir=$topdir/etc/hotplug
8test -f $dir/net.agent || exit 1
9mv $dir/net.agent $dir/net.agent.orig
10
11sed -e '/^\*)/i\
12unregister)\
13 # Assume that we want to run ifdown no matter what, \
14 # because it is not going to remove the data from the \
15 # ifstate database otherwise.\
16 if [ -x /sbin/ifdown ]; then\
17 debug_mesg invoke ifdown $INTERFACE\
18 exec /sbin/ifdown $INTERFACE\
19 else\
20 # mesg "how do I bring interfaces up on this distro?"\
21 mesg "E: /sbin/ifdown not found. You need to install ifupdown package"\
22 fi\
23 mesg $1 $ACTION event not handled\
24 ;;\
25' $dir/net.agent.orig > $dir/net.agent
26rm -f $dir/net.agent.orig
27chmod 755 $dir/net.agent
28exit 0
29