Browse Source

add an optional parameter to scan_interfaces() that can override the network config file (defaults to 'network')

SVN-Revision: 6619
Felix Fietkau 19 years ago
parent
commit
f9abb7cbba
1 changed files with 2 additions and 1 deletions
  1. 2 1
      package/base-files/files/lib/network/config.sh

+ 2 - 1
package/base-files/files/lib/network/config.sh

@@ -24,6 +24,7 @@ find_config() {
 }
 
 scan_interfaces() {
+	local cfgfile="$1"
 	local mode iftype iface ifname device
 	interfaces=
 	config_cb() {
@@ -50,7 +51,7 @@ scan_interfaces() {
 			;;
 		esac
 	}
-	config_load network
+	config_load "${cfgfile:-network}"
 }
 
 add_vlan() {