From 92c8f925e82fa2d5e918e165c0b14bb9885b3b97 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 3 Nov 2006 04:38:20 +0000 Subject: [PATCH] export initial vlan port settings in preinit, so that rcS can set them again SVN-Revision: 5401 --- openwrt/package/base-files/default/etc/init.d/rcS | 1 + openwrt/package/base-files/default/etc/preinit | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/openwrt/package/base-files/default/etc/init.d/rcS b/openwrt/package/base-files/default/etc/init.d/rcS index c887a19eb5..45e0bbe198 100755 --- a/openwrt/package/base-files/default/etc/init.d/rcS +++ b/openwrt/package/base-files/default/etc/init.d/rcS @@ -11,6 +11,7 @@ echo "$v0p" > /proc/switch/eth0/vlan/0/ports echo "$v1p" > /proc/switch/eth0/vlan/1/ports echo "$v2p" > /proc/switch/eth0/vlan/2/ports + unset v0p v1p v2p } mount_root diff --git a/openwrt/package/base-files/default/etc/preinit b/openwrt/package/base-files/default/etc/preinit index e8ac2d56ed..fa5037b7ae 100755 --- a/openwrt/package/base-files/default/etc/preinit +++ b/openwrt/package/base-files/default/etc/preinit @@ -24,9 +24,9 @@ ifconfig $ifname 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up # save the boot loader's vlan config # we need it on some routers that have no vlan*ports set [ -d /proc/switch/eth0 ] && { - v0p="$(cat /proc/switch/eth0/vlan/0/ports)" - v1p="$(cat /proc/switch/eth0/vlan/1/ports)" - v2p="$(cat /proc/switch/eth0/vlan/2/ports)" + export v0p="$(cat /proc/switch/eth0/vlan/0/ports)" + export v1p="$(cat /proc/switch/eth0/vlan/1/ports)" + export v2p="$(cat /proc/switch/eth0/vlan/2/ports)" echo 1 > /proc/switch/eth0/reset # this would be easier if we blasted the message across all ports -- 2.30.2