Commit 3dd3fb76 authored by Maria Jan Matejka's avatar Maria Jan Matejka

Birdlab local updates

parent 505697a5
......@@ -12,6 +12,7 @@ case ${HOSTTYPE^^} in
FREEBSD)
INSTALLPKG="pkg install rsync autotools bison flex readline gmake"
FSTAB="192.168.192.1:/var/lib/virt/nfs /mnt/nfs nfs rw 0 0"
DHCPFIX="echo 'request broadcast-address, domain-name, domain-name-servers, domain-search, host-name, routers;' >> /etc/dhclient.conf"
;;
OPENBSD) ;&
NETBSD)
......@@ -62,6 +63,8 @@ else
mount /mnt/nfs
fi
$DHCPFIX
cat >/etc/rc.local <<EOC
#!/bin/bash
until [ -x /mnt/nfs/rc.local ]; do
......
......@@ -19,7 +19,7 @@ Host freebsd10-install
Host freebsd11-install
Image freebsd11
Memory 512M
VNC 51
# VNC 54
Type freebsd
Host freebsd082
......@@ -125,7 +125,7 @@ Copy openbsd58 miniob
Host miniob
Memory 512M
Copy freebsd10 minifb
Copy freebsd11 minifb
Host minifb
Memory 1024M
......
......@@ -5,27 +5,29 @@ export PATH=$PATH:/usr/local/bin:/usr/pkg/bin
. /mnt/nfs/rclib
case $UNAME in
linux)
AUTOCONF=autoconf
linux)
AUTOCONF=autoreconf
MAKE=make
iptables -F # Flush predefined firewall
;;
freebsd|netbsd)
AUTOCONF=autoconf
AUTOCONF=autoreconf
MAKE=gmake
sysctl -w net.inet6.ip6.forwarding=1
sysctl -w net.inet.ip.forwarding=1
;;
openbsd)
AUTOCONF=autoconf-2.69
AUTOCONF=autoreconf-2.69
MAKE=gmake
sysctl -w net.inet6.ip6.forwarding=1
sysctl -w net.inet.ip.forwarding=1
sysctl -w net.inet.esp.enable=1
sysctl -w net.inet.gre.allow=1
sysctl -w net.inet.esp.enable=1
sysctl -w net.inet.gre.allow=1
;;
*)
echo "Unknown system $UNAME"
......
......@@ -91,7 +91,7 @@ function gre() {
GIF=gre$(grecount)
ifconfig $GIF create
ifconfig $GIF tunnel $2 $3
ifconfig $GIF name $1
ifconfig $GIF name $1 >/dev/null
echo $1
INTERFACES+=( $1, )
;;
......@@ -142,7 +142,7 @@ function dummy() {
LIF=lo$(locount)
ifconfig $LIF create
ifconfig $LIF inet6 fe80::1/64
ifconfig $LIF name $1
ifconfig $LIF name $1 >/dev/null
echo $1
INTERFACES+=( $1, )
;;
......@@ -155,9 +155,10 @@ function ifname() {
linux)
ip link set $1 name $2
echo $2
;;
freebsd)
ifconfig $1 name $2
ifconfig $1 name $2 >/dev/null
echo $2
;;
openbsd)
......@@ -170,6 +171,26 @@ function ifname() {
esac
}
function ifnameset() {
D ifnameset "$@"
OLD=${IFBYMAC[$1]}
if [ "x$OLD" = "x$2" ]; then D "no change"; return; fi
IFBYMAC[$1]=$2
local -a NI
for I in ${INTERFACES[@]}; do
if [ "$I" = "$OLD,$1" ]; then
NI+=( $2,$1 )
else
NI+=( $I )
fi
done
INTERFACES=( ${NI[@]} )
D "interface list after change: ${INTERFACES[@]}"
}
# Get list of physical interfaces, together with their MACs.
function ifaces() {
D ifaces
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment