Changeset 2987


Ignore:
Timestamp:
2006-01-15T17:17:26+01:00 (12 years ago)
Author:
nbd
Message:

save the boot loader's vlan config before setting the failsafe config and restore it just before running /sbin/init - necessary for wrt54g v1.1, which doesn't have vlan*ports variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/whiterussian/openwrt/package/base-files/default/etc/preinit

    r2984 r2987  
    99insmod switch-robo || insmod switch-adm || rmmod switch-core 
    1010 
     11# save the boot loader's vlan config 
     12# we need it on some routers that have no vlan*ports set 
    1113[ -d /proc/switch/eth0 ] && { 
     14        v0p="$(cat /proc/switch/eth0/vlan/0/ports)" 
     15        v1p="$(cat /proc/switch/eth0/vlan/1/ports)" 
     16        v2p="$(cat /proc/switch/eth0/vlan/2/ports)" 
    1217        echo 1 > /proc/switch/eth0/reset 
    1318        echo "0 1 2 3 4 5u*" > /proc/switch/eth0/vlan/0/ports 
     
    3540mount_root ${FAILSAFE:+failsafe} 
    3641 
    37 # remove the drivers for now, just in case the user has newer versions on the jffs2 partition 
     42# revert to the boot loader's vlan config 
     43# required for at least WRT54G v1.1 
     44[ -d /proc/switch/eth0 ] && { 
     45        echo "$v0p" > /proc/switch/eth0/vlan/0/ports 
     46        echo "$v1p" > /proc/switch/eth0/vlan/1/ports 
     47        echo "$v2p" > /proc/switch/eth0/vlan/2/ports 
     48} 
     49 
     50# remove the drivers for now 
    3851rmmod switch-robo 
    3952rmmod switch-adm 
Note: See TracChangeset for help on using the changeset viewer.