Changeset 5ee7f4b2 in freewrt
- Timestamp:
- Jun 14, 2007, 5:14:35 PM (18 years ago)
- Children:
- c32c6e0
- Parents:
- 0aa5ac1
- File:
-
- 1 edited
-
package/base-files/Makefile (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
package/base-files/Makefile
r0aa5ac1 r5ee7f4b2 22 22 23 23 MD5CRYPT:= $(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)))26 24 27 25 ADMIN_SHELL:= /bin/sh … … 131 129 $(IDIR_BASE_FILES)/etc/network/interfaces 132 130 echo -e "\n# LAN port configuration" >>$(IDIR_BASE_FILES)/etc/network/interfaces 133 ifeq ($(strip $( FWRT_NETWORK_LAN_SWITCH_PORTS)),)131 ifeq ($(strip $(subst ",,${FWRT_NETWORK_LAN_SWITCH_PORTS})),) 134 132 cat ./netcfg/interfaces.static | sed "/broadcast/d" | \ 135 133 sed "/^auto/d" >>$(IDIR_BASE_FILES)/etc/network/interfaces … … 137 135 cat ./netcfg/interfaces.static.switch | sed "/broadcast/d" | \ 138 136 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" \ 140 138 $(IDIR_BASE_FILES)/etc/network/interfaces 141 139 endif … … 146 144 $(SED) "s/@FWRT_NETMASK@/255.255.255.255/g" \ 147 145 $(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 150 147 else 151 148 echo -e "\n# LAN port configuration" >>$(IDIR_BASE_FILES)/etc/network/interfaces 152 149 ifeq ($(FWRT_NETWORK_LAN_PROTO_STATIC),y) 153 ifeq ($(strip $( FWRT_NETWORK_LAN_SWITCH_PORTS)),)150 ifeq ($(strip $(subst ",,${FWRT_NETWORK_LAN_SWITCH_PORTS})),) 154 151 cat ./netcfg/interfaces.static >>$(IDIR_BASE_FILES)/etc/network/interfaces 155 152 else 156 153 cat ./netcfg/interfaces.static.switch \ 157 154 >>$(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" \ 159 156 $(IDIR_BASE_FILES)/etc/network/interfaces 160 157 endif … … 165 162 $(SED) "s/@FWRT_NETMASK@/$(FWRT_NETWORK_LAN_IP_NETMASK)/g" \ 166 163 $(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 169 165 endif 170 166 ifeq (FWRT_NETWORK_LAN_PROTO_DHCP),y) 171 ifeq ($(strip $( FWRT_NETWORK_LAN_SWITCH_PORTS)),)167 ifeq ($(strip $(subst ",,${FWRT_NETWORK_LAN_SWITCH_PORTS})),) 172 168 cat ./netcfg/interfaces.dhcp >>$(IDIR_BASE_FILES)/etc/network/interfaces 173 169 else 174 170 cat ./netcfg/interfaces.dhcp.switch \ 175 171 >>$(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" \ 177 173 $(IDIR_BASE_FILES)/etc/network/interfaces 178 174 endif … … 181 177 endif 182 178 endif 183 ifeq ($(strip $ {FWRT_NETWORK_LAN_LLADDR}),)179 ifeq ($(strip $(subst ",,${FWRT_NETWORK_LAN_LLADDR})),) 184 180 printf ',g/@FWRT_LLADDR@/d\nwq\n' | \ 185 181 ed -s ${IDIR_BASE_FILES}/etc/network/interfaces 186 182 else 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' | \ 188 184 ed -s ${IDIR_BASE_FILES}/etc/network/interfaces 189 185 endif … … 192 188 echo -e "\n# WAN port configuration" >>$(IDIR_BASE_FILES)/etc/network/interfaces 193 189 ifeq ($(FWRT_NETWORK_WAN_PROTO_DHCP),y) 194 ifeq ($(strip $( FWRT_NETWORK_WAN_SWITCH_PORTS)),)190 ifeq ($(strip $(subst ",,${FWRT_NETWORK_WAN_SWITCH_PORTS})),) 195 191 cat ./netcfg/interfaces.dhcp >>$(IDIR_BASE_FILES)/etc/network/interfaces 196 192 else 197 193 cat ./netcfg/interfaces.dhcp.switch \ 198 194 >>$(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" \ 200 196 $(IDIR_BASE_FILES)/etc/network/interfaces 201 197 endif … … 204 200 endif 205 201 ifeq ($(FWRT_NETWORK_WAN_PROTO_STATIC),y) 206 ifeq ($(strip $( FWRT_NETWORK_WAN_SWITCH_PORTS)),)202 ifeq ($(strip $(subst ",,${FWRT_NETWORK_WAN_SWITCH_PORTS})),) 207 203 cat ./netcfg/interfaces.static >>$(IDIR_BASE_FILES)/etc/network/interfaces 208 204 else 209 205 cat ./netcfg/interfaces.static.switch \ 210 206 >>$(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" \ 212 208 $(IDIR_BASE_FILES)/etc/network/interfaces 213 209 endif … … 221 217 $(IDIR_BASE_FILES)/etc/network/interfaces 222 218 endif 223 ifeq ($(strip $ {FWRT_NETWORK_WAN_LLADDR}),)219 ifeq ($(strip $(subst ",,${FWRT_NETWORK_WAN_LLADDR})),) 224 220 printf ',g/@FWRT_LLADDR@/d\nwq\n' | \ 225 221 ed -s ${IDIR_BASE_FILES}/etc/network/interfaces 226 222 else 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' | \ 228 224 ed -s ${IDIR_BASE_FILES}/etc/network/interfaces 229 225 endif … … 372 368 $(IDIR_BASE_FILES)/etc/network/interfaces 373 369 endif 374 ifeq ($(strip $ {FWRT_NETWORK_WAN_LLADDR}),)370 ifeq ($(strip $(subst ",,${FWRT_NETWORK_WLAN_LLADDR})),) 375 371 printf ',g/@FWRT_LLADDR@/d\nwq\n' | \ 376 372 ed -s ${IDIR_BASE_FILES}/etc/network/interfaces 377 373 else 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' | \ 379 375 ed -s ${IDIR_BASE_FILES}/etc/network/interfaces 380 376 endif
Note:
See TracChangeset
for help on using the changeset viewer.
