Since we are using this for ports now, too, the variable
should have a generic name and the zone check must be removed
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
# Read network settings
network_settings_read
-zone="${1}"
-assert isset zone
-assert zone_exists ${zone}
+device="${1}"
+assert isset device
# Create socket dir.
mkdir -p ${WPA_SUPPLICANT_SOCKET_DIR} 2>/dev/null
-config_file="$(wpa_supplicant_config_dir ${zone})/wpa_supplicant.conf"
+config_file="$(wpa_supplicant_config_dir ${device})/wpa_supplicant.conf"
-cmd="wpa_supplicant -i ${zone} -c ${config_file}"
+cmd="wpa_supplicant -i ${device} -c ${config_file}"
-if device_is_wireless ${zone}; then
+if device_is_wireless ${device}; then
cmd="${cmd} -Dwext"
else
cmd="${cmd} -Dwired"