Opened 12 years ago

Closed 11 years ago

#600 closed enhancement (fixed)

Easy adding/changing of network interfaces

Reported by: tom at aussec dot com Owned by: developers
Priority: normal Milestone: 0.9/rc6
Component: base system Version:
Keywords: Cc:


When adding or changing interfaces frequently this patch keeps the interface list in NVRAM which then is the only thing that changes.


diff -uNr rom/etc/init.d/S05nvram etc/init.d/S05nvram
--- rom/etc/init.d/S05nvram     Mon Mar 27 02:39:52 2006
+++ etc/init.d/S05nvram Sat Jan  1 11:32:41 2000
@@ -160,6 +160,8 @@
 nvram_default wan_device "vlan1"
 nvram_default wan_proto "dhcp"
+nvram_default interfaces "lan wan wifi"
 nvram_default wl0_ssid OpenWrt
 nvram_default wl0_mode ap
 nvram_default wl0_infra 1
diff -uNr rom/etc/init.d/S40network etc/init.d/S40network
--- rom/etc/init.d/S40network   Mon Mar 27 02:39:52 2006
+++ etc/init.d/S40network       Sat Jan  1 11:47:50 2000
@@ -1,9 +1,10 @@
 case "$1" in
-    ifup lan
-    ifup wan
-    ifup wifi
+    ${FAILSAFE:+ifup lan}
+    for interface in $(nvram get interfaces); do {
+      ifup $interface
+    } done
     wifi up
     for route in $(nvram get static_route); do {

Attachments (0)

Change History (2)

comment:1 Changed 12 years ago by florian

The current state of S40network basically does almost the same thing as you proposes, except that the variable name containing interfaces is "ifup_interfaces"

comment:2 Changed 11 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.