Commit 86f338ef authored by Leigh Stoller's avatar Leigh Stoller

Add optional /share stuff, which is configured in via the defs file,

and passed back from tmcd mounts command to the nodes. If not defined
in the defs file, it will not be compiled into tmcd.
parent aa08763a
......@@ -14,4 +14,5 @@
#undef FSDIR_PROJ
#undef FSDIR_GROUPS
#undef FSDIR_USERS
#undef FSDIR_SHARE
#undef SFSSUPPORT
......@@ -53,6 +53,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
sitefile=
srcdir=
target=NONE
verbose=
......@@ -167,6 +168,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
......@@ -337,6 +339,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
-site-file | --site-file | --site-fil | --site-fi | --site-f)
ac_prev=sitefile ;;
-site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
sitefile="$ac_optarg" ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
......@@ -502,12 +509,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
if test -z "$sitefile"; then
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
else
CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
......@@ -575,7 +586,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:579: checking host system type" >&5
echo "configure:590: checking host system type" >&5
host_alias=$host
case "$host_alias" in
......@@ -596,7 +607,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:600: checking build system type" >&5
echo "configure:611: checking build system type" >&5
build_alias=$build
case "$build_alias" in
......@@ -622,7 +633,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:626: checking for $ac_word" >&5
echo "configure:637: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -654,7 +665,7 @@ fi
# Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
set dummy ${ac_tool_prefix}g++; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:658: checking for $ac_word" >&5
echo "configure:669: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -686,7 +697,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:690: checking for $ac_word" >&5
echo "configure:701: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -718,7 +729,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:722: checking for $ac_word" >&5
echo "configure:733: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -750,7 +761,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:754: checking for $ac_word" >&5
echo "configure:765: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -782,7 +793,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ssh", so it can be a program name with args.
set dummy ${ac_tool_prefix}ssh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:786: checking for $ac_word" >&5
echo "configure:797: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_SSH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -924,6 +935,12 @@ cat >> confdefs.h <<EOF
#define FSDIR_USERS "$FSDIR_USERS"
EOF
if test -n "$FSDIR_SHARE"; then
cat >> confdefs.h <<EOF
#define FSDIR_SHARE "$FSDIR_SHARE"
EOF
fi
#
# The email addresses need to be be munged for perl scripts.
......@@ -1177,7 +1194,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:1181: checking for a BSD compatible install" >&5
echo "configure:1198: 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
......@@ -1293,7 +1310,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tmcd/tmcd.restart \
utils/GNUmakefile utils/vlandiff utils/vlansync utils/delay_config \
utils/sshtb utils/create_image utils/node_admin utils/webcreateimage \
utils/firstuser utils/export_tables\
utils/firstuser utils/export_tables \
utils/addpubkey utils/webaddpubkey utils/cvsupd.pl \
www/GNUmakefile www/defs.php3 www/dbdefs.php3 \
vis/GNUmakefile vis/vistopology vis/webvistopology vis/top2gif \
......
......@@ -90,6 +90,9 @@ AC_DEFINE_UNQUOTED(OURDOMAIN, "$OURDOMAIN")
AC_DEFINE_UNQUOTED(FSDIR_PROJ, "$FSDIR_PROJ")
AC_DEFINE_UNQUOTED(FSDIR_GROUPS, "$FSDIR_GROUPS")
AC_DEFINE_UNQUOTED(FSDIR_USERS, "$FSDIR_USERS")
if test -n "$FSDIR_SHARE"; then
AC_DEFINE_UNQUOTED(FSDIR_SHARE, "$FSDIR_SHARE")
fi
#
# The email addresses need to be be munged for perl scripts.
......
......@@ -24,3 +24,4 @@ OURDOMAIN=emulab.net
FSDIR_GROUPS=/q/groups
FSDIR_PROJ=/q/proj
FSDIR_USERS=/users
FSDIR_SHARE=/share
......@@ -43,9 +43,13 @@
#define FSPROJDIR FSNODE ":" FSDIR_PROJ
#define FSGROUPDIR FSNODE ":" FSDIR_GROUPS
#define FSUSERDIR FSNODE ":" FSDIR_USERS
#ifdef FSDIR_SHARE
#define FSSHAREDIR FSNODE ":" FSDIR_SHARE
#endif
#define PROJDIR "/proj"
#define GROUPDIR "/groups"
#define USERDIR "/users"
#define SHAREDIR "/share"
#define RELOADPID "emulab-ops"
#define RELOADEID "reloading"
#define FSHOSTID "/usr/testbed/etc/fshostid"
......@@ -2308,6 +2312,14 @@ COMMAND_PROTOTYPE(domounts)
client_writeback(sock, buf, strlen(buf), tcp);
info("MOUNTS: %s", buf);
#ifdef FSSHAREDIR
/*
* Return share mount if its defined.
*/
sprintf(buf, "REMOTE=%s LOCAL=%s\n",FSSHAREDIR, SHAREDIR);
client_writeback(sock, buf, strlen(buf), tcp);
info("MOUNTS: %s", buf);
#endif
/*
* If pid!=gid, then this is group experiment, and we return
* a mount for the group directory too.
......@@ -2320,6 +2332,15 @@ COMMAND_PROTOTYPE(domounts)
}
}
else {
#ifdef FSSHAREDIR
/*
* Pointer to /share.
*/
sprintf(buf, "SFS REMOTE=%s%s LOCAL=%s\n",
fshostid, FSDIR_SHARE, SHAREDIR);
client_writeback(sock, buf, strlen(buf), tcp);
info("MOUNTS: %s", buf);
#endif
/*
* Return SFS-based mounts. Locally, we send back per
* project/group mounts (really symlinks) cause thats the
......
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