Skip to contentSkip to conversation

Patch to allow local net startup.

PATCH Sean Reifschneider 1 participant 1 message Aug 1, 2004

lore
Share & tools
lore
#0 lore raw

Attached is a patch which looks for "/etc/hotplug/net-local", and uses that in preference to "ifup" or other distro-specific configs to bring the interface up. I added this to a local copy because it seems to be the only way I can get my own script to run for bringing up a hotplug wireless interface. Unfortunately, just listing some iwconfig arguments isn't really that useful for the mobile user, I have a script that configures itself differently depending on where it detects I am.

Some sort of mechanism for allowing users to wedge into the initialization is really needed.

Sean

Signature · 4 lines
 Resistance isn't futile.  It's voltage over amperage.
Sean Reifschneider, Member of Technical Staff <[email protected]>
tummy.com, ltd. - Linux Consulting since 1995.  Qmail, Python, SysAdmin
      Back off man. I'm a scientist.   http://HackingSociety.org/
etc/hotplug/net.agent renamed from etc/hotplug/net.agent.old +5 -1
@@ -62,8 +62,12 @@
 		fi;
 	    fi
 
-	    # RedHat and similar
 	    export IN_HOTPLUG=1
+	    # user-configured startup
+	    if [ -x /etc/hotplug/net-local.agent ]; then
+                exec /etc/hotplug/net-local.agent
+
+	    # RedHat and similar
 	    if [ -x /sbin/ifup ]; then
 		debug_mesg invoke ifup $INTERFACE
 		exec /sbin/ifup $INTERFACE