Commit 2f6a197d authored by Mike Hibler's avatar Mike Hibler

We don't have enough config time variables yet, so I added:

	FSNODE_IP
	EXTERNAL_FSNODE_IP

which default to ops' IP address if not set.  This allows for separate
ops/fs nodes, a config Aero has.

Also push some IP addresses (boss, ops, fs) into config.h so they can
be used in C programs.  Specifically tmcd for returning values of
"firewall variables" that can be used in default firewall rules.
But I will likely wind up putting the var/value pairs in the DB rather
than compiling them into tmcd.
parent af8bed4f
......@@ -11,9 +11,15 @@
#undef JAILIPBASE
#undef JAILIPMASK
#undef BOSSNODE
#undef BOSSNODE_IP
#undef USERNODE
#undef USERNODE_IP
#undef FSNODE
#undef FSNODE_IP
#undef OURDOMAIN
#undef CONTROL_ROUTER_IP
#undef CONTROL_NETWORK
#undef CONTROL_NETMASK
#undef FSDIR_PROJ
#undef FSDIR_GROUPS
#undef FSDIR_USERS
......@@ -23,5 +29,6 @@
#undef LOG_TESTBED
#undef EVENTSERVER
#undef BOSSEVENTPORT
#undef HAVE_LINUX_VIDEODEV_H
#undef HAVE_MEZZANINE
......@@ -901,6 +901,8 @@ fi
......@@ -1031,14 +1033,45 @@ cat >> confdefs.h <<EOF
#define BOSSNODE "$BOSSNODE"
EOF
cat >> confdefs.h <<EOF
#define BOSSNODE_IP "$BOSSNODE_IP"
EOF
cat >> confdefs.h <<EOF
#define USERNODE "$USERNODE"
EOF
cat >> confdefs.h <<EOF
#define USERNODE_IP "$USERNODE_IP"
EOF
cat >> confdefs.h <<EOF
#define FSNODE "$FSNODE"
EOF
if test -n "$FSNODE_IP"; then
cat >> confdefs.h <<EOF
#define FSNODE_IP "$FSNODE_IP"
EOF
elif test "$USERNODE" = "$FSNODE"; then
cat >> confdefs.h <<EOF
#define FSNODE_IP "$USERNODE_IP"
EOF
fi
cat >> confdefs.h <<EOF
#define CONTROL_ROUTER_IP "$CONTROL_ROUTER_IP"
EOF
cat >> confdefs.h <<EOF
#define CONTROL_NETWORK "$CONTROL_NETWORK"
EOF
cat >> confdefs.h <<EOF
#define CONTROL_NETMASK "$CONTROL_NETMASK"
EOF
cat >> confdefs.h <<EOF
#define FSDIR_PROJ "$FSDIR_PROJ"
EOF
......@@ -1157,6 +1190,12 @@ fi
if test -z "$EXTERNAL_USERNODE_IP"; then
EXTERNAL_USERNODE_IP=$USERNODE_IP
fi
if test -z "$FSNODE_IP"; then
FSNODE_IP=$USERNODE_IP
fi
if test -z "$EXTERNAL_FSNODE_IP"; then
EXTERNAL_FSNODE_IP=$FSNODE_IP
fi
if test -z "$TBAUTHDOMAIN"; then
TBAUTHDOMAIN=".$OURDOMAIN"
fi
......@@ -1390,7 +1429,7 @@ fi
# Check for the robot vision system dependencies.
#
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1395: checking how to run the C preprocessor" >&5
echo "configure:1433: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
......@@ -1405,13 +1444,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1410 "configure"
#line 1448 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -1422,13 +1461,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1427 "configure"
#line 1465 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -1439,13 +1478,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 1444 "configure"
#line 1482 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -1473,17 +1512,17 @@ for ac_hdr in linux/videodev.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1478: checking for $ac_hdr" >&5
echo "configure:1516: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1483 "configure"
#line 1521 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -1516,7 +1555,7 @@ done
# Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1521: checking for $ac_word" >&5
echo "configure:1559: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1588,7 +1627,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1593: checking for a BSD compatible install" >&5
echo "configure:1631: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1996,6 +2035,8 @@ s%@BOSSNODE_IP@%$BOSSNODE_IP%g
s%@EXTERNAL_BOSSNODE_IP@%$EXTERNAL_BOSSNODE_IP%g
s%@USERNODE_IP@%$USERNODE_IP%g
s%@EXTERNAL_USERNODE_IP@%$EXTERNAL_USERNODE_IP%g
s%@FSNODE_IP@%$FSNODE_IP%g
s%@EXTERNAL_FSNODE_IP@%$EXTERNAL_FSNODE_IP%g
s%@CONTROL_ROUTER_IP@%$CONTROL_ROUTER_IP%g
s%@CONTROL_NETWORK@%$CONTROL_NETWORK%g
s%@CONTROL_NETMASK@%$CONTROL_NETMASK%g
......
......@@ -77,6 +77,8 @@ AC_SUBST(BOSSNODE_IP)
AC_SUBST(EXTERNAL_BOSSNODE_IP)
AC_SUBST(USERNODE_IP)
AC_SUBST(EXTERNAL_USERNODE_IP)
AC_SUBST(FSNODE_IP)
AC_SUBST(EXTERNAL_FSNODE_IP)
AC_SUBST(CONTROL_ROUTER_IP)
AC_SUBST(CONTROL_NETWORK)
AC_SUBST(CONTROL_NETMASK)
......@@ -194,8 +196,18 @@ AC_DEFINE_UNQUOTED(IPBASE, "$IPBASE")
AC_DEFINE_UNQUOTED(JAILIPBASE, "$JAILIPBASE")
AC_DEFINE_UNQUOTED(JAILIPMASK, "$JAILIPMASK")
AC_DEFINE_UNQUOTED(BOSSNODE, "$BOSSNODE")
AC_DEFINE_UNQUOTED(BOSSNODE_IP, "$BOSSNODE_IP")
AC_DEFINE_UNQUOTED(USERNODE, "$USERNODE")
AC_DEFINE_UNQUOTED(USERNODE_IP, "$USERNODE_IP")
AC_DEFINE_UNQUOTED(FSNODE, "$FSNODE")
if test -n "$FSNODE_IP"; then
AC_DEFINE_UNQUOTED(FSNODE_IP, "$FSNODE_IP")
elif test "$USERNODE" = "$FSNODE"; then
AC_DEFINE_UNQUOTED(FSNODE_IP, "$USERNODE_IP")
fi
AC_DEFINE_UNQUOTED(CONTROL_ROUTER_IP, "$CONTROL_ROUTER_IP")
AC_DEFINE_UNQUOTED(CONTROL_NETWORK, "$CONTROL_NETWORK")
AC_DEFINE_UNQUOTED(CONTROL_NETMASK, "$CONTROL_NETMASK")
AC_DEFINE_UNQUOTED(FSDIR_PROJ, "$FSDIR_PROJ")
AC_DEFINE_UNQUOTED(FSDIR_GROUPS, "$FSDIR_GROUPS")
AC_DEFINE_UNQUOTED(FSDIR_USERS, "$FSDIR_USERS")
......@@ -292,6 +304,12 @@ fi
if test -z "$EXTERNAL_USERNODE_IP"; then
EXTERNAL_USERNODE_IP=$USERNODE_IP
fi
if test -z "$FSNODE_IP"; then
FSNODE_IP=$USERNODE_IP
fi
if test -z "$EXTERNAL_FSNODE_IP"; then
EXTERNAL_FSNODE_IP=$FSNODE_IP
fi
if test -z "$TBAUTHDOMAIN"; then
TBAUTHDOMAIN=".$OURDOMAIN"
fi
......
......@@ -54,6 +54,8 @@ BOSSNODE_IP=155.98.32.70
EXTERNAL_BOSSNODE_IP=$BOSSNODE_IP
USERNODE_IP=155.98.33.74
EXTERNAL_USERNODE_IP=$USERNODE_IP
FSNODE_IP=$USERNODE_IP
EXTERNAL_FSNODE_IP=$USERNODE_IP
CONTROL_ROUTER_IP=155.98.36.1
CONTROL_NETWORK=155.98.36.0
CONTROL_NETMASK=255.255.252.0
......
......@@ -101,6 +101,7 @@ SSLCERT_ORGNAME="Utah Network Testbed"
#
BOSSNODE_IP=155.98.32.70
USERNODE_IP=155.98.33.74
FSNODE_IP=$USERNODE_IP
#
# If your boss/ops nodes are multihomed (and typically, one of the
......@@ -110,6 +111,7 @@ USERNODE_IP=155.98.33.74
#
EXTERNAL_BOSSNODE_IP=$BOSSNODE_IP
EXTERNAL_USERNODE_IP=$USERNODE_IP
EXTERNAL_FSNODE_IP=$USERNODE_IP
#
# The overall control network range
......
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