Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
labs
bird-tools
Commits
ec171ab7
Commit
ec171ab7
authored
Aug 12, 2020
by
Ondřej Zajíček
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into mh-bird_tables
parents
01f5abeb
4f08efe3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
8 deletions
+54
-8
netlab/common/common.start
netlab/common/common.start
+24
-2
netlab/start
netlab/start
+30
-6
No files found.
netlab/common/common.start
View file @
ec171ab7
#!/bin/bash
if
[
-f
$COMMON
/bird
]
then
...
...
@@ -16,6 +17,27 @@ sysctl net.mpls.platform_labels=1024
fi
ulimit
-c
unlimited
./bird -l -P bird.pid
#./bird -c bird.conf -s bird.ctl
BIRD_CMD
=
"./bird"
if
$BIRD_DEBUG
;
then
BIRD_ARGS
=
"-l -P bird.pid -dD bird.debug"
BIRD_BG
=
true
else
BIRD_ARGS
=
"-l -P bird.pid"
BIRD_BG
=
false
fi
run_bird
()
{
if
[
-z
"
${
VALGRIND_ARGS
}
"
]
;
then
${
BIRD_CMD
}
${
BIRD_ARGS
}
else
valgrind
--log-file
=
bird.valgrind
${
VALGRIND_ARGS
}
${
BIRD_CMD
}
${
BIRD_ARGS
}
fi
}
if
${
BIRD_BG
}
;
then
run_bird &
else
run_bird
fi
netlab/start
View file @
ec171ab7
...
...
@@ -2,23 +2,47 @@
set
-e
while
getopts
":c:h:"
OPTION
;
do
showhelp
()
{
echo
-e
"USAGE:
$0
[-c <cf-ospf|cf-babel|...> ]"
echo
echo
-e
"
\t
-d
\t\t
enable BIRD debug mode"
echo
-e
"
\t
-V
\"
args
\"\t
run Valgrind with these args"
echo
-e
"
\t
-h
\t\t
show this help"
}
while
getopts
":c:hdV:"
OPTION
;
do
case
"
${
OPTION
}
"
in
c
)
CONF
=
${
OPTARG
}
if
[
-d
"
$CONF
"
]
;
then
echo
-e
"Creating symlink config -->
$CONF
\n
"
ln
-s
"
${
CONF
}
"
config
.
netlab_lib
.
config/config
else
echo
"Incorrect name of protocol"
fi
;;
h|--h
)
echo
-e
"USAGE:
$0
[-c <cf-ospf|cf-babel|...> ]
\n
"
d
)
export
BIRD_DEBUG
=
true
;;
V
)
export
VALGRIND_ARGS
=
"
${
OPTARG
}
"
;;
h
)
showhelp
exit
0
;;
*
)
showhelp
exit
2
;;
esac
done
if
[
-z
"
${
CONF
}
"
]
;
then
showhelp
exit
2
fi
.
netlab_lib
.
config/config
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