Changeset 5ee7f4b2 in freewrt


Ignore:
Timestamp:
Jun 14, 2007, 5:14:35 PM (18 years ago)
Author:
Thorsten Glaser <tg@…>
Children:
c32c6e0
Parents:
0aa5ac1
Message:
  • aah, _so_ you're stripping them quotation marks
  • fix lladdr wlan (pasto)
  • can't be so hard to remove a blank line, eh?

git-svn-id: svn://www.freewrt.org/trunk/freewrt@2805 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package/base-files/Makefile

    r0aa5ac1 r5ee7f4b2  
    2222
    2323MD5CRYPT:=              $(shell $(MKPASSWD) $(FWRT_RUNTIME_PASSWORD))
    24 LAN_SWITCH_PORTS:=      $(strip $(subst ",, $(FWRT_NETWORK_LAN_SWITCH_PORTS)))
    25 WAN_SWITCH_PORTS:=      $(strip $(subst ",, $(FWRT_NETWORK_WAN_SWITCH_PORTS)))
    2624
    2725ADMIN_SHELL:=           /bin/sh
     
    131129            $(IDIR_BASE_FILES)/etc/network/interfaces
    132130        echo -e "\n# LAN port configuration" >>$(IDIR_BASE_FILES)/etc/network/interfaces
    133 ifeq ($(strip $(FWRT_NETWORK_LAN_SWITCH_PORTS)),)
     131ifeq ($(strip $(subst ",,${FWRT_NETWORK_LAN_SWITCH_PORTS})),)
    134132        cat ./netcfg/interfaces.static | sed "/broadcast/d" | \
    135133            sed "/^auto/d" >>$(IDIR_BASE_FILES)/etc/network/interfaces
     
    137135        cat ./netcfg/interfaces.static.switch | sed "/broadcast/d" | \
    138136            sed "/^auto/d" >>$(IDIR_BASE_FILES)/etc/network/interfaces
    139         $(SED) "s/@FWRT_SWITCH_PORTS@/$(LAN_SWITCH_PORTS)/g" \
     137        $(SED) "s/@FWRT_SWITCH_PORTS@/$(strip $(subst ",,${FWRT_NETWORK_LAN_SWITCH_PORTS}))/g" \
    140138            $(IDIR_BASE_FILES)/etc/network/interfaces
    141139endif
     
    146144        $(SED) "s/@FWRT_NETMASK@/255.255.255.255/g" \
    147145            $(IDIR_BASE_FILES)/etc/network/interfaces
    148         $(SED) "s/gateway.*//" \
    149             $(IDIR_BASE_FILES)/etc/network/interfaces
     146        printf ',g/gateway/d\nwq\n' | ed -s ${IDIR_BASE_FILES}/etc/network/interfaces
    150147else
    151148        echo -e "\n# LAN port configuration" >>$(IDIR_BASE_FILES)/etc/network/interfaces
    152149ifeq ($(FWRT_NETWORK_LAN_PROTO_STATIC),y)
    153 ifeq ($(strip $(FWRT_NETWORK_LAN_SWITCH_PORTS)),)
     150ifeq ($(strip $(subst ",,${FWRT_NETWORK_LAN_SWITCH_PORTS})),)
    154151        cat ./netcfg/interfaces.static >>$(IDIR_BASE_FILES)/etc/network/interfaces
    155152else
    156153        cat ./netcfg/interfaces.static.switch \
    157154            >>$(IDIR_BASE_FILES)/etc/network/interfaces
    158         $(SED) "s/@FWRT_SWITCH_PORTS@/$(LAN_SWITCH_PORTS)/g" \
     155        $(SED) "s/@FWRT_SWITCH_PORTS@/$(strip $(subst ",,${FWRT_NETWORK_LAN_SWITCH_PORTS}))/g" \
    159156            $(IDIR_BASE_FILES)/etc/network/interfaces
    160157endif
     
    165162        $(SED) "s/@FWRT_NETMASK@/$(FWRT_NETWORK_LAN_IP_NETMASK)/g" \
    166163            $(IDIR_BASE_FILES)/etc/network/interfaces
    167         $(SED) "s/gateway.*//" \
    168             $(IDIR_BASE_FILES)/etc/network/interfaces
     164        printf ',g/gateway/d\nwq\n' | ed -s ${IDIR_BASE_FILES}/etc/network/interfaces
    169165endif
    170166ifeq (FWRT_NETWORK_LAN_PROTO_DHCP),y)
    171 ifeq ($(strip $(FWRT_NETWORK_LAN_SWITCH_PORTS)),)
     167ifeq ($(strip $(subst ",,${FWRT_NETWORK_LAN_SWITCH_PORTS})),)
    172168        cat ./netcfg/interfaces.dhcp >>$(IDIR_BASE_FILES)/etc/network/interfaces
    173169else
    174170        cat ./netcfg/interfaces.dhcp.switch \
    175171            >>$(IDIR_BASE_FILES)/etc/network/interfaces
    176         $(SED) "s/@FWRT_SWITCH_PORTS@/$(LAN_SWITCH_PORTS)/g" \
     172        $(SED) "s/@FWRT_SWITCH_PORTS@/$(strip $(subst ",,${FWRT_NETWORK_LAN_SWITCH_PORTS}))/g" \
    177173            $(IDIR_BASE_FILES)/etc/network/interfaces
    178174endif
     
    181177endif
    182178endif
    183 ifeq ($(strip ${FWRT_NETWORK_LAN_LLADDR}),)
     179ifeq ($(strip $(subst ",,${FWRT_NETWORK_LAN_LLADDR})),)
    184180        printf ',g/@FWRT_LLADDR@/d\nwq\n' | \
    185181            ed -s ${IDIR_BASE_FILES}/etc/network/interfaces
    186182else
    187         printf ',g/@FWRT_LLADDR@/s//${FWRT_NETWORK_LAN_LLADDR}/\nwq\n' | \
     183        printf ',g/@FWRT_LLADDR@/s//$(strip $(subst ",,${FWRT_NETWORK_LAN_LLADDR}))/\nwq\n' | \
    188184            ed -s ${IDIR_BASE_FILES}/etc/network/interfaces
    189185endif
     
    192188        echo -e "\n# WAN port configuration" >>$(IDIR_BASE_FILES)/etc/network/interfaces
    193189ifeq ($(FWRT_NETWORK_WAN_PROTO_DHCP),y)
    194 ifeq ($(strip $(FWRT_NETWORK_WAN_SWITCH_PORTS)),)
     190ifeq ($(strip $(subst ",,${FWRT_NETWORK_WAN_SWITCH_PORTS})),)
    195191        cat ./netcfg/interfaces.dhcp >>$(IDIR_BASE_FILES)/etc/network/interfaces
    196192else
    197193        cat ./netcfg/interfaces.dhcp.switch \
    198194            >>$(IDIR_BASE_FILES)/etc/network/interfaces
    199         $(SED) "s/@FWRT_SWITCH_PORTS@/$(WAN_SWITCH_PORTS)/g" \
     195        $(SED) "s/@FWRT_SWITCH_PORTS@/$(strip $(subst ",,${FWRT_NETWORK_WAN_SWITCH_PORTS}))/g" \
    200196            $(IDIR_BASE_FILES)/etc/network/interfaces
    201197endif
     
    204200endif
    205201ifeq ($(FWRT_NETWORK_WAN_PROTO_STATIC),y)
    206 ifeq ($(strip $(FWRT_NETWORK_WAN_SWITCH_PORTS)),)
     202ifeq ($(strip $(subst ",,${FWRT_NETWORK_WAN_SWITCH_PORTS})),)
    207203        cat ./netcfg/interfaces.static >>$(IDIR_BASE_FILES)/etc/network/interfaces
    208204else
    209205        cat ./netcfg/interfaces.static.switch \
    210206            >>$(IDIR_BASE_FILES)/etc/network/interfaces
    211         $(SED) "s/@FWRT_SWITCH_PORTS@/$(WAN_SWITCH_PORTS)/g" \
     207        $(SED) "s/@FWRT_SWITCH_PORTS@/$(strip $(subst ",,${FWRT_NETWORK_WAN_SWITCH_PORTS}))/g" \
    212208            $(IDIR_BASE_FILES)/etc/network/interfaces
    213209endif
     
    221217            $(IDIR_BASE_FILES)/etc/network/interfaces
    222218endif
    223 ifeq ($(strip ${FWRT_NETWORK_WAN_LLADDR}),)
     219ifeq ($(strip $(subst ",,${FWRT_NETWORK_WAN_LLADDR})),)
    224220        printf ',g/@FWRT_LLADDR@/d\nwq\n' | \
    225221            ed -s ${IDIR_BASE_FILES}/etc/network/interfaces
    226222else
    227         printf ',g/@FWRT_LLADDR@/s//${FWRT_NETWORK_WAN_LLADDR}/\nwq\n' | \
     223        printf ',g/@FWRT_LLADDR@/s//$(strip $(subst ",,${FWRT_NETWORK_WAN_LLADDR}))/\nwq\n' | \
    228224            ed -s ${IDIR_BASE_FILES}/etc/network/interfaces
    229225endif
     
    372368            $(IDIR_BASE_FILES)/etc/network/interfaces
    373369endif
    374 ifeq ($(strip ${FWRT_NETWORK_WAN_LLADDR}),)
     370ifeq ($(strip $(subst ",,${FWRT_NETWORK_WLAN_LLADDR})),)
    375371        printf ',g/@FWRT_LLADDR@/d\nwq\n' | \
    376372            ed -s ${IDIR_BASE_FILES}/etc/network/interfaces
    377373else
    378         printf ',g/@FWRT_LLADDR@/s//${FWRT_NETWORK_WAN_LLADDR}/\nwq\n' | \
     374        printf ',g/@FWRT_LLADDR@/s//$(strip $(subst ",,${FWRT_NETWORK_WLAN_LLADDR}))/\nwq\n' | \
    379375            ed -s ${IDIR_BASE_FILES}/etc/network/interfaces
    380376endif
Note: See TracChangeset for help on using the changeset viewer.