Changeset 2804

Show
Ignore:
Timestamp:
06/14/07 16:43:47 (1 year ago)
Author:
tg
Message:

experimental: support changing the lladdr via menuconfig too

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/package/Config.in.network

    r2737 r2804  
    2828        help 
    2929         LAN interface name 
     30 
     31config FWRT_NETWORK_LAN_LLADDR 
     32        string "LAN port link-layer (MAC) address" 
     33        default "" 
     34        depends on FWRT_NETWORK_LAN 
     35        help 
     36          Change the link-layer (MAC) address for the LAN port here, 
     37          or set to an empty string to not change it at startup. 
    3038 
    3139config FWRT_NETWORK_LAN_SWITCH_PORTS 
     
    126134         WAN interface name 
    127135 
     136config FWRT_NETWORK_WAN_LLADDR 
     137        string "WAN port link-layer (MAC) address" 
     138        default "" 
     139        depends on FWRT_NETWORK_WAN 
     140        help 
     141          Change the link-layer (MAC) address for the WAN port here, 
     142          or set to an empty string to not change it at startup. 
     143 
    128144config FWRT_NETWORK_WAN_SWITCH_PORTS 
    129145        string "Switch ports used for WAN" 
     
    202218         Wireless LAN interface name 
    203219 
     220config FWRT_NETWORK_WLAN_LLADDR 
     221        string "WLAN port link-layer (MAC) address" 
     222        default "" 
     223        depends on FWRT_NETWORK_WLAN 
     224        help 
     225          Change the link-layer (MAC) address for the WLAN port here, 
     226          or set to an empty string to not change it at startup. 
     227 
    204228config FWRT_NETWORK_WLAN_IP_ADDRESS 
    205229        string "WLAN IP address" 
  • trunk/freewrt/package/base-files/Makefile

    r2798 r2804  
    1010PKG_NAME:=              base-files 
    1111PKG_VERSION:=           1.1 
    12 PKG_RELEASE:=           1 
     12PKG_RELEASE:=           2 
    1313WRKDIST=                ${WRKDIR}/base-files 
    1414NO_DISTFILES:=          1 
     
    181181endif 
    182182endif 
     183ifeq ($(strip ${FWRT_NETWORK_LAN_LLADDR}),) 
     184        printf ',g/@FWRT_LLADDR@/d\nwq\n' | \ 
     185            ed -s ${IDIR_BASE_FILES}/etc/network/interfaces 
     186else 
     187        printf ',g/@FWRT_LLADDR@/s//${FWRT_NETWORK_LAN_LLADDR}/\nwq\n' | \ 
     188            ed -s ${IDIR_BASE_FILES}/etc/network/interfaces 
     189endif 
    183190endif 
    184191ifeq ($(FWRT_NETWORK_WAN),y) 
     
    213220        $(SED) "s/@FWRT_GATEWAY@/$(FWRT_NETWORK_WAN_IP_GATEWAY)/g" \ 
    214221            $(IDIR_BASE_FILES)/etc/network/interfaces 
     222endif 
     223ifeq ($(strip ${FWRT_NETWORK_WAN_LLADDR}),) 
     224        printf ',g/@FWRT_LLADDR@/d\nwq\n' | \ 
     225            ed -s ${IDIR_BASE_FILES}/etc/network/interfaces 
     226else 
     227        printf ',g/@FWRT_LLADDR@/s//${FWRT_NETWORK_WAN_LLADDR}/\nwq\n' | \ 
     228            ed -s ${IDIR_BASE_FILES}/etc/network/interfaces 
    215229endif 
    216230endif 
     
    246260        $(SED) "s/@FWRT_CHANNEL@/$(FWRT_NETWORK_WLAN_CHANNEL)/g" \ 
    247261            $(IDIR_BASE_FILES)/etc/network/interfaces 
    248 endif 
    249262ifeq ($(FWRT_NETWORK_WLAN_MODE_AP), y) 
    250263        $(SED) "s/@FWRT_MODE@/ap/g" \ 
     
    358371        $(SED) "s/@FWRT_RADIUS_KEY@/$(FWRT_NETWORK_WLAN_RADIUS_KEY)/g" \ 
    359372            $(IDIR_BASE_FILES)/etc/network/interfaces 
     373endif 
     374ifeq ($(strip ${FWRT_NETWORK_WAN_LLADDR}),) 
     375        printf ',g/@FWRT_LLADDR@/d\nwq\n' | \ 
     376            ed -s ${IDIR_BASE_FILES}/etc/network/interfaces 
     377else 
     378        printf ',g/@FWRT_LLADDR@/s//${FWRT_NETWORK_WAN_LLADDR}/\nwq\n' | \ 
     379            ed -s ${IDIR_BASE_FILES}/etc/network/interfaces 
     380endif 
    360381endif 
    361382        -find $(IDIR_BASE_FILES) -type d -name CVS | xargs rm -rf 
  • trunk/freewrt/package/base-files/netcfg/interfaces.dhcp

    r1845 r2804  
    11auto @FWRT_INTERFACE@ 
    22iface @FWRT_INTERFACE@ inet dhcp 
     3        lladdr @FWRT_LLADDR@ 
  • trunk/freewrt/package/base-files/netcfg/interfaces.dhcp.switch

    r2378 r2804  
    11auto @FWRT_INTERFACE@ 
    22iface @FWRT_INTERFACE@ inet dhcp 
     3        lladdr @FWRT_LLADDR@ 
    34        switch-ports @FWRT_SWITCH_PORTS@ 
    45        broadcast + 
  • trunk/freewrt/package/base-files/netcfg/interfaces.static

    r2378 r2804  
    11auto @FWRT_INTERFACE@ 
    22iface @FWRT_INTERFACE@ inet static 
     3        lladdr @FWRT_LLADDR@ 
    34        address @FWRT_ADDRESS@ 
    45        netmask @FWRT_NETMASK@ 
  • trunk/freewrt/package/base-files/netcfg/interfaces.static.switch

    r2378 r2804  
    11auto @FWRT_INTERFACE@ 
    22iface @FWRT_INTERFACE@ inet static 
     3        lladdr @FWRT_LLADDR@ 
    34        switch-ports @FWRT_SWITCH_PORTS@ 
    45        address @FWRT_ADDRESS@ 
  • trunk/freewrt/package/base-files/netcfg/interfaces.wlan

    r2737 r2804  
    11auto @FWRT_WLAN@ 
    22iface @FWRT_WLAN@ inet static 
     3        lladdr @FWRT_LLADDR@ 
    34        address @FWRT_ADDRESS@ 
    45        netmask @FWRT_NETMASK@