From: Michael Tremer Date: Sun, 27 May 2012 11:59:36 +0000 (+0000) Subject: Move all port patterns into functions.constants. X-Git-Tag: 004~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ee92277951d18df73efd2324b9ca82bd9ceaabf;p=network.git Move all port patterns into functions.constants. --- diff --git a/functions.constants b/functions.constants index 40f306df..52f35649 100644 --- a/functions.constants +++ b/functions.constants @@ -80,3 +80,5 @@ TIMEOUT_RESTART=2 DEVICE_PRINT_LINE1=" %-24s %s\n" PORT_PATTERN="pN" +PORT_PATTERN_ACCESSPOINT="apN" +PORT_PATTERN_WIRELESS="wN" diff --git a/hooks/ports/wireless-ap b/hooks/ports/wireless-ap index 5e4f86b0..b98e3e70 100755 --- a/hooks/ports/wireless-ap +++ b/hooks/ports/wireless-ap @@ -19,9 +19,7 @@ # # ############################################################################### -. /lib/network/header-port - -DEVICE_PATTERN="apN" +. /usr/lib/network/header-port HOOK_SETTINGS="HOOK ADDRESS BROADCAST_SSID CHANNEL COUNTRY_CODE MODE PHY SSID" @@ -81,7 +79,7 @@ function _create() { PHY=$(phy_get ${PHY}) PHY=$(phy_get_address ${PHY}) - local port=$(port_find_free ${DEVICE_PATTERN}) + local port=$(port_find_free ${PORT_PATTERN_ACCESSPOINT}) assert isset port config_write $(port_file ${port}) ${HOOK_SETTINGS}