diff options
author | Koen Kooi <koen@openembedded.org> | 2005-06-30 08:19:37 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-06-30 08:19:37 +0000 |
commit | c8e5702127e507e82e6f68a4b8c546803accea9d (patch) | |
tree | 00583491f40ecc640f2b28452af995e3a63a09d7 /packages/linux-hotplug/linux-hotplug-20040329/fix-net.agent | |
parent | 87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff) |
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/linux-hotplug/linux-hotplug-20040329/fix-net.agent')
-rw-r--r-- | packages/linux-hotplug/linux-hotplug-20040329/fix-net.agent | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/packages/linux-hotplug/linux-hotplug-20040329/fix-net.agent b/packages/linux-hotplug/linux-hotplug-20040329/fix-net.agent index e69de29bb2..3bc0935018 100644 --- a/packages/linux-hotplug/linux-hotplug-20040329/fix-net.agent +++ b/packages/linux-hotplug/linux-hotplug-20040329/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 + |