From e65f40e01f3cf98b5cbd340c060ae7afca536b8e Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 27 Apr 2018 22:54:28 +0200 Subject: [PATCH] Add network configuration Signed-off-by: David Oberhollenzer --- pkg/init/build | 8 ++++++++ product/router/interfaces.alix/port0 | 1 + product/router/interfaces.alix/port1 | 1 + product/router/interfaces.alix/port2 | 1 + product/router/interfaces.rpi3/port0 | 1 + 5 files changed, 12 insertions(+) create mode 100644 product/router/interfaces.alix/port0 create mode 100644 product/router/interfaces.alix/port1 create mode 100644 product/router/interfaces.alix/port2 create mode 100644 product/router/interfaces.rpi3/port0 diff --git a/pkg/init/build b/pkg/init/build index 84ad276..c3ad82b 100755 --- a/pkg/init/build +++ b/pkg/init/build @@ -45,6 +45,14 @@ deploy() { ln -s "/share/init/ifrename" "$DEPLOY/etc/init.d/ifrename" fi + svc=$(file_path_override "interfaces") + if [ ! -z "$svc" ]; then + for svc in $svc/*; do + [ -f "$svc" ] || continue + cp "$svc" "$DEPLOY/etc/netcfg/" + done + fi + for svc in $GETTY_TTY; do ln -s "/share/init/agetty" "$DEPLOY/etc/init.d/agetty@$svc" done diff --git a/product/router/interfaces.alix/port0 b/product/router/interfaces.alix/port0 new file mode 100644 index 0000000..09fba90 --- /dev/null +++ b/product/router/interfaces.alix/port0 @@ -0,0 +1 @@ +ip 192.168.0.1/24 diff --git a/product/router/interfaces.alix/port1 b/product/router/interfaces.alix/port1 new file mode 100644 index 0000000..4d0c576 --- /dev/null +++ b/product/router/interfaces.alix/port1 @@ -0,0 +1 @@ +ip 192.168.1.1/24 diff --git a/product/router/interfaces.alix/port2 b/product/router/interfaces.alix/port2 new file mode 100644 index 0000000..e261933 --- /dev/null +++ b/product/router/interfaces.alix/port2 @@ -0,0 +1 @@ +ip 192.168.2.1/24 diff --git a/product/router/interfaces.rpi3/port0 b/product/router/interfaces.rpi3/port0 new file mode 100644 index 0000000..09fba90 --- /dev/null +++ b/product/router/interfaces.rpi3/port0 @@ -0,0 +1 @@ +ip 192.168.0.1/24