This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BRIDGES="br0 br1" | |
LAN="lan1 lan2 lan3 lan4" | |
LAN_VID=101 | |
WAN="wan" | |
WAN_VID=102 | |
IFACE=eth0 | |
LAN_IP="192.168.0.2/24" | |
WAN_IP="192.168.2.2/24" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tc qdisc add dev eth1 handle ffff: ingress | |
tc qdisc add dev eth3 handle ffff: ingress | |
tc filter add dev eth3 parent ffff: u32 \ | |
> match u32 0 0 \ | |
> action mirred egress redirect dev eth1 | |
tc filter add dev eth1 parent ffff: u32 \ | |
> match u32 0 0 \ | |
> action mirred egress redirect dev eth3 | |
ifconfig eth3 promisc | |
ifconfig eth1 promisc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
id=$(id -u) | |
if [ $id != 0 ]; then | |
SUDO=sudo | |
else | |
SUDO="" | |
fi | |
KERN_DIR=${1:-$HOME/dev/linux/} | |
INST_DIR=$PWD/mnt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ $# -ne 1 ] && { echo not system.img provided, exit.; exit 0; } | |
sudo umount `pwd`/system | |
sudo rmmod ubifs | |
sudo rmmod ubi | |
sudo rmmod nandsim | |
sudo rmmod mtdblock |