Commit c5777c2b authored by Leigh Stoller's avatar Leigh Stoller

Add --disable-sfs option since on boss its hard to determine if SFS

is installed on ops. Makes the use of SFS more explicit, which is
good.
parent 97b65788
......@@ -14,4 +14,4 @@
#undef FSDIR_PROJ
#undef FSDIR_GROUPS
#undef FSDIR_USERS
#undef SFSSUPPORT
......@@ -28,9 +28,11 @@ ac_help="$ac_help
--enable-debug Build with debug flags (-g -DDEBUG)
--disable-debug Build with optimization flags (-O2 -DNDEBUG -UDEBUG)"
ac_help="$ac_help
--disable-events Disable events (requires Elvin libraries)"
--disable-events Disable events (requires Elvin libraries)"
ac_help="$ac_help
--enable-windows Enable Windows XP support (requires third-party software)"
--enable-windows Enable Windows XP support (requires third-party software)"
ac_help="$ac_help
--disable-sfs Disable SFS support (SFS must be installed on ops)"
ac_help="$ac_help
--enable-testmode Enable test mode
--disable-testmode Disable test mode"
......@@ -51,6 +53,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
sitefile=
srcdir=
target=NONE
verbose=
......@@ -165,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
......@@ -335,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=*)
......@@ -500,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
......@@ -573,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:577: checking host system type" >&5
echo "configure:590: checking host system type" >&5
host_alias=$host
case "$host_alias" in
......@@ -594,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:598: checking build system type" >&5
echo "configure:611: checking build system type" >&5
build_alias=$build
case "$build_alias" in
......@@ -620,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:624: 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
......@@ -652,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:656: 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
......@@ -684,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:688: 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
......@@ -716,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:720: 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
......@@ -748,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:752: 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
......@@ -780,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:784: 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
......@@ -1116,6 +1129,27 @@ else
fi
#
# Disable SFS support if SFS is not installed on ops node.
#
# Check whether --enable-sfs or --disable-sfs was given.
if test "${enable_sfs+set}" = set; then
enableval="$enable_sfs"
:
fi
if test "$enable_sfs" = "no"; then
SFSSUPPORT=0;
else
SFSSUPPORT=1;
cat >> confdefs.h <<\EOF
#define SFSSUPPORT 1
EOF
fi
#
# Testing mode. In testing mode scripts should not effect hardware state.
# This is designed to be used with the testsuite software which operates
......@@ -1150,7 +1184,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:1154: checking for a BSD compatible install" >&5
echo "configure:1188: 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
......@@ -1462,6 +1496,7 @@ s%@INSTALL_APACHE_CONFIG@%$INSTALL_APACHE_CONFIG%g
s%@OPT_CFLAGS@%$OPT_CFLAGS%g
s%@EVENTSYS@%$EVENTSYS%g
s%@WINSUPPORT@%$WINSUPPORT%g
s%@SFSSUPPORT@%$SFSSUPPORT%g
s%@TESTMODE@%$TESTMODE%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
......
......@@ -208,7 +208,7 @@ AC_SUBST(OPT_CFLAGS)
# Disable event system. Relies on Elvin. On by default.
#
AC_ARG_ENABLE(events,
[ --disable-events Disable events (requires Elvin libraries)])
[ --disable-events Disable events (requires Elvin libraries)])
if test "$enable_events" = "no"; then
eventfiles="";
......@@ -236,7 +236,7 @@ AC_SUBST(EVENTSYS)
# Off by default.
#
AC_ARG_ENABLE(windows,
[ --enable-windows Enable Windows XP support (requires third-party software)])
[ --enable-windows Enable Windows XP support (requires third-party software)])
if test "$enable_windows" = "yes"; then
winfiles="os/imagezip/ntfs/GNUmakefile";
......@@ -248,6 +248,20 @@ else
fi
AC_SUBST(WINSUPPORT)
#
# Disable SFS support if SFS is not installed on ops node.
#
AC_ARG_ENABLE(sfs,
[ --disable-sfs Disable SFS support (SFS must be installed on ops)])
if test "$enable_sfs" = "no"; then
SFSSUPPORT=0;
else
SFSSUPPORT=1;
AC_DEFINE(SFSSUPPORT)
fi
AC_SUBST(SFSSUPPORT)
#
# Testing mode. In testing mode scripts should not effect hardware state.
# This is designed to be used with the testsuite software which operates
......
......@@ -32,6 +32,7 @@ my $TBOPS = "@TBOPSEMAIL@";
my $TBLOGS = "@TBLOGSEMAIL@";
my $CONTROL = "@USERNODE@";
my $BOSSNODE= "@BOSSNODE@";
my $WITHSFS = @SFSSUPPORT@;
my $HOMEDIR = "/users";
my $USERPATH= "$TB/bin";
......@@ -404,7 +405,6 @@ sub AUDIT($)
#
sub FirstTime()
{
my $dosfs = 0;
my $dossh = 0;
#
......@@ -413,25 +413,18 @@ sub FirstTime()
# to be updated (and "sfskey register" won't work because it
# prompts for the user's UNIX password if not run from root.)
#
if (! -e "$SFSDIR" ) {
print "Setting up sfs configuration for $user.\n";
mkdir("$SFSDIR", 0700) or
fatal("Could not mkdir $SFSDIR: $!");
chown($user_number, $default_groupgid, "$SFSDIR") or
fatal("Could not chown $SFSDIR: $!");
$dosfs = 1;
}
if ($WITHSFS &&
! -e "$SFSDIR/identity") {
if (! -e "$SFSDIR" ) {
print "Setting up sfs configuration for $user.\n";
#
# Check for missing identity file
#
if (! -e "$SFSDIR/identity") {
$dosfs = 1;
}
mkdir("$SFSDIR", 0700) or
fatal("Could not mkdir $SFSDIR: $!");
chown($user_number, $default_groupgid, "$SFSDIR") or
fatal("Could not chown $SFSDIR: $!");
}
if ($dosfs) {
print "Generating sfs key\n";
if (system("$SSH -host $control_node '$SFSKEYGEN -KPn ".
"$user\@ops.emulab.net $SFSDIR/identity'")) {
......
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