Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bird-tools
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
labs
bird-tools
Commits
3dd3fb76
Commit
3dd3fb76
authored
Jul 19, 2018
by
Maria Jan Matejka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Birdlab local updates
parent
505697a5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
13 deletions
+39
-13
birdlab/bin/postinst
birdlab/bin/postinst
+3
-0
birdlab/etc/virtlist
birdlab/etc/virtlist
+2
-2
birdlab/nfs/rc.local
birdlab/nfs/rc.local
+10
-8
birdlab/nfs/rclib
birdlab/nfs/rclib
+24
-3
No files found.
birdlab/bin/postinst
View file @
3dd3fb76
...
...
@@ -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
...
...
birdlab/etc/virtlist
View file @
3dd3fb76
...
...
@@ -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 freebsd1
0
minifb
Copy freebsd1
1
minifb
Host minifb
Memory 1024M
...
...
birdlab/nfs/rc.local
View file @
3dd3fb76
...
...
@@ -5,27 +5,29 @@ export PATH=$PATH:/usr/local/bin:/usr/pkg/bin
.
/mnt/nfs/rclib
case
$UNAME
in
linux
)
AUTOCONF
=
auto
conf
linux
)
AUTOCONF
=
autore
conf
MAKE
=
make
iptables
-F
# Flush predefined firewall
;;
freebsd|netbsd
)
AUTOCONF
=
autoconf
AUTOCONF
=
auto
re
conf
MAKE
=
gmake
sysctl
-w
net.inet6.ip6.forwarding
=
1
sysctl
-w
net.inet.ip.forwarding
=
1
;;
openbsd
)
AUTOCONF
=
autoconf-2.69
AUTOCONF
=
auto
re
conf-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
"
...
...
birdlab/nfs/rclib
View file @
3dd3fb76
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment