Skip to content
Snippets Groups Projects
Commit cf7c5039 authored by treba's avatar treba
Browse files

lots of stuff

parent 5991e4e1
No related branches found
No related tags found
No related merge requests found
Pipeline #
Showing
with 209 additions and 42 deletions
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
set -e set -e
set -u set -u
CLIENTMAX=4 CLIENTMAX=2
cd ../OpenWrt-ImageBuilder-x86-64.Linux-x86_64 cd ../OpenWrt-ImageBuilder-x86-64.Linux-x86_64
for i in `seq 0 $CLIENTMAX`; do for i in `seq 0 $CLIENTMAX`; do
#PACKAGES='oonf-olsrd2 ip tcpdump nano -kmod-acpi-button' #PACKAGES='oonf-olsrd2 ip6tables-mod-nat ip tcpdump nano htop tmux -kmod-acpi-button'
#PACKAGES='babeld ip tcpdump nano -kmod-acpi-button' #PACKAGES='babeld ip tcpdump nano -kmod-acpi-button'
#PACKAGES='bmx6 bmx6-uci-config ip tcpdump nano htop -kmod-acpi-button' #PACKAGES='bmx6 bmx6-uci-config ip tcpdump nano htop -kmod-acpi-button'
make image PACKAGES='oonf-olsrd2 ip6tables-mod-nat ip tcpdump nano htop tmux -kmod-acpi-button' FILES=../git/image-builder/files$i make image PACKAGES='oonf-olsrd2 ip6tables-mod-nat ip tcpdump nano htop tmux -kmod-acpi-button' FILES=../git/image-builder/files$i -j5
cd bin/x86/ cd bin/x86/
gunzip openwrt-x86-64-combined-ext4.img.gz gunzip openwrt-x86-64-combined-ext4.img.gz
mv openwrt-x86-64-combined-ext4.img ../../../images/openwrt-x86-64-combined-ext4-$i.img mv openwrt-x86-64-combined-ext4.img ../../../images/openwrt-x86-64-combined-ext4-$i.img
......
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ip6prefix '2000:1::/56'
option ip6assign '60'
config interface 'wan'
option ifname 'eth0'
option proto 'static'
option ip6assign '60'
config interface 'mesh0'
option ifname 'eth1'
option proto 'hnet'
#option proto 'static'
#option ip6assign '60'
config interface 'mesh2'
option ifname 'eth2'
option proto 'hnet'
#option proto 'static'
#option ip6assign '60'
config globals 'globals'
option ula_prefix 'auto'
config 'route6'
option 'interface' 'wan'
option 'target' '::/0'
File added
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
option localservice '1'
config dhcp 'mesh1'
option interface 'mesh1'
option dhcpv6 'server'
option ra 'server'
config dhcp 'mesh2'
option interface 'mesh2'
option dhcpv6 'server'
option ra 'server'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ip6prefix '2000:2::/56'
option ip6assign '60'
config interface 'wan'
option ifname 'eth0'
option proto 'static'
option ip6assign '60'
config interface 'mesh2'
option ifname 'eth1'
option proto 'hnet'
prefix 2000:2::/58
#option proto 'static'
#option ip6assign '60'
config interface 'mesh1'
option ifname 'eth2'
option proto 'hnet'
prefix 2000:2:0:40::/58
#option proto 'static'
#option ip6assign '60'
config globals 'globals'
option ula_prefix 'auto'
config 'route6'
option 'interface' 'wan'
option 'target' '::/0'
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ip6prefix '2000:2::/56'
option ip6assign '60'
config interface 'wan'
option ifname 'eth0'
option proto 'static'
option ip6assign '60'
config interface 'mesh2'
option ifname 'eth1'
option proto 'static'
option ip6assign '60'
config interface 'mesh1'
option ifname 'eth2'
option proto 'static'
option ip6assign '60'
config globals 'globals'
option ula_prefix 'auto'
config 'route6'
option 'interface' 'wan'
option 'target' '::/0'
config interface 'loopback'
option ifname 'lo'
option proto 'static'
#list ip6prefix '2000:1:0:80::0/57'
#list ip6prefix '2000:2:0:80::0/57'
option ip6assign '60'
config interface 'mesh0'
option ifname 'eth0'
option proto 'hnet'
#option proto 'static'
#option ip6assign '60'
config interface 'mesh1'
option ifname 'eth1'
option proto 'hnet'
#option proto 'static'
#option ip6assign '60'
config interface 'wlan'
option ifname 'eth2'
option proto 'hnet'
#option proto 'static'
#option ip6assign '60'
config globals 'globals'
option ula_prefix 'auto'
File added
#/bin/sh
set -e
set -u
cd ../odhcp6c
VERSION=`git log -1 --format="%H"`
cd ../openwrt
DIRECTORY='build_dir/target-x86_64_musl-1.1.14/odhcp6c-2015-09-04/'
if [ -d "$DIRECTORY" ]; then
rm -r $DIRECTORY
fi
FILE='dl/odhcp6c-2015-09-04.tar.bz2'
if [ -e "$FILE" ]; then
rm $FILE
fi
sed -i "18s/.*/PKG_SOURCE_VERSION:=$VERSION/" package/network/ipv6/odhcp6c/Makefile
make package/odhcp6c/prepare
make package/odhcp6c/compile
cd ..
cp openwrt/build_dir/target-x86_64_musl-1.1.14/odhcp6c-2015-09-04/odhcp6c git/image-builder/files2/usr/sbin/odhcp6c
#!/bin/bash #!/bin/bash
set -u
#--general #--general
BRIDGE_CONF_FILE='/etc/qemu/bridge.conf' BRIDGE_CONF_FILE='/etc/qemu/bridge.conf'
#--links
MAXDEVICE=3
#----------------- #-----------------
CLEAN=0
if [[ ! -z ${1+x} && "$1" == "clean" ]]; then
CLEAN=1
fi
for i in `seq 0 $MAXDEVICE`; do function create_interfaces() {
DEV="link$i" for i in `seq 0 $2`; do
DEV="$1$i"
GREP=`brctl show | grep $DEV` GREP=`brctl show | grep $DEV`
if [ -z "${GREP}" ]; then
echo "creating interface $DEV"
brctl addbr $DEV
ip link set $DEV up
fi
if ! grep -q $DEV $BRIDGE_CONF_FILE; then if [ $CLEAN -eq 1 ];then
echo "allow $DEV" >> $BRIDGE_CONF_FILE if [ ! -z "${GREP}" ]; then
echo "removing interface $DEV"
ip link set $DEV down
brctl delbr $DEV
fi fi
done
#--wans
MAXDEVICE=1
#----------------- sed -i "/allow $DEV/d" $BRIDGE_CONF_FILE
else
for i in `seq 0 $MAXDEVICE`; do
DEV="wan$i"
GREP=`brctl show | grep $DEV`
if [ -z "${GREP}" ]; then if [ -z "${GREP}" ]; then
echo "creating interface $DEV" echo "creating interface $DEV"
brctl addbr $DEV brctl addbr $DEV
...@@ -41,5 +31,11 @@ for i in `seq 0 $MAXDEVICE`; do ...@@ -41,5 +31,11 @@ for i in `seq 0 $MAXDEVICE`; do
if ! grep -q $DEV $BRIDGE_CONF_FILE; then if ! grep -q $DEV $BRIDGE_CONF_FILE; then
echo "allow $DEV" >> $BRIDGE_CONF_FILE echo "allow $DEV" >> $BRIDGE_CONF_FILE
fi fi
fi
done done
}
#--links
create_interfaces "link" 3
#--wans
create_interfaces "wan" 1
#!/bin/bash #!/bin/bash
set -e
set -u
#------------- config area -------------- #------------- config area --------------
#DEVDRIVER='virtio' #DEVDRIVER='virtio'
DEVDRIVER='e1000' DEVDRIVER='e1000'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment