From 025424d127dc21be7a4b2b3630cb278206ded838 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 15 Nov 2011 18:21:00 +0000 Subject: [PATCH] lantiq: add runtime generation of /etc/config/network SVN-Revision: 29161 --- target/linux/lantiq/base-files.mk | 5 + .../lantiq/base-files/etc/config/network | 26 ---- .../base-files/etc/uci-defaults/network | 126 ++++++++++++++++++ target/linux/lantiq/base-files/lib/lantiq.sh | 4 + 4 files changed, 135 insertions(+), 26 deletions(-) create mode 100644 target/linux/lantiq/base-files.mk delete mode 100644 target/linux/lantiq/base-files/etc/config/network create mode 100755 target/linux/lantiq/base-files/etc/uci-defaults/network diff --git a/target/linux/lantiq/base-files.mk b/target/linux/lantiq/base-files.mk new file mode 100644 index 0000000000..d6682bd388 --- /dev/null +++ b/target/linux/lantiq/base-files.mk @@ -0,0 +1,5 @@ +define Package/base-files/install-target + rm -f $(1)/etc/config/network +endef + + diff --git a/target/linux/lantiq/base-files/etc/config/network b/target/linux/lantiq/base-files/etc/config/network deleted file mode 100644 index 183e6bf34c..0000000000 --- a/target/linux/lantiq/base-files/etc/config/network +++ /dev/null @@ -1,26 +0,0 @@ -config interface loopback - option ifname lo - option proto static - option ipaddr 127.0.0.1 - option netmask 255.0.0.0 - -config interface lan - option ifname eth0 - option type bridge - option proto static - option ipaddr 192.168.1.1 - option netmask 255.255.255.0 - -config atm-bridge - option unit 0 - option encaps llc - option vpi 1 - option vci 32 - option payload bridged # some ISPs need this set to 'routed' - -config interface wan - option ifname nas0 - option proto pppoe - option username "" - option password "" - option unit 0 diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/network b/target/linux/lantiq/base-files/etc/uci-defaults/network new file mode 100755 index 0000000000..f9a723754d --- /dev/null +++ b/target/linux/lantiq/base-files/etc/uci-defaults/network @@ -0,0 +1,126 @@ +#!/bin/sh +# +# Copyright (C) 2011 OpenWrt.org +# + +set_interface_loopback() { + uci batch <