Commit 0c9a715a authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Merge branch 'master' of git-public.flux.utah.edu:/flux/git/emulab-devel

parents cf0ae227 24e8b2f5
......@@ -177,7 +177,7 @@ my ($dev,$ino,$mode,$nlink,undef,undef,$rdev,$size,
my $if_mod_since = 0;
$if_mod_since = str2time($ENV{HTTP_IF_MODIFIED_SINCE})
if defined $ENV{HTTP_IF_MODIFIED_SINCE};
if ($if_mod_since > 0 && $if_mod_since <= $mtime) {
if ($mtime <= $if_mod_since) {
print "Status: 304 Not Modified\n\n";
} else {
print "Content-Type: $mime_type\n" if defined $mime_type;
......
......@@ -64,12 +64,18 @@ $| = 1;
BEGIN
{
if (-e "../Makeconf") {
my $srcdir = "@top_srcdir@";
my $objdir = `/bin/pwd`;
chomp($objdir);
# Prior to first install or running from object dir.
unshift(@INC, "$objdir/../db");
unshift(@INC, "$objdir/@top_srcdir@/install");
unshift(@INC, "$objdir/@top_srcdir@/tbsetup");
if ($srcdir =~ /^\//) {
unshift(@INC, "$srcdir/install");
unshift(@INC, "$srcdir/tbsetup");
} else {
unshift(@INC, "$objdir/$srcdir/install");
unshift(@INC, "$objdir/$srcdir/tbsetup");
}
unshift(@INC, "$objdir/../tbsetup");
}
}
......@@ -117,10 +123,17 @@ if (! (-e "../db/dbupdate" && -e "./update-install")) {
my $objdir = `/bin/pwd`;
chomp($objdir);
my $abssrcdir;
if ($SRCDIR =~ /^\//) {
$abssrcdir = "$SRCDIR";
} else {
$abssrcdir = "$objdir/$SRCDIR";
}
my @INCDIRS = ("-I${objdir}", "-I${objdir}/../tbsetup",
"-I${objdir}/../db",
"-I${objdir}/${SRCDIR}/tbsetup",
"-I${objdir}/${SRCDIR}/install",
"-I${abssrcdir}/tbsetup",
"-I${abssrcdir}/install",
# To catch a few extra things that do not normally change.
"-I@prefix@/lib"
);
......
......@@ -393,6 +393,7 @@ fi
# which disk is which.
$BINDIR/get_edd_map > $BOOTDIR/edd_map 2>/dev/null
FRISBEE_OPTS="-S $BOSSIP"
if [ -e $BOOTDIR/myip ]; then
......@@ -400,6 +401,28 @@ if [ -e $BOOTDIR/myip ]; then
fi
IMAGEUNZIP_OPTS="-o -O -W 32"
RESIDMEM=32
RESIDMEM=`expr \( $RESIDMEM + 2 \) \* 1024`
FREEMEM=`free | sed -n 's/^-\/+ buffers.* \([0-9]*\)$/\1/p'`
if [ -z "$FREEMEM" ]; then
# BusyBox's 'free' command has slightly different output
FREEMEM=`free | sed -n 's/^ *Mem: *[0-9]* *[0-9]* *\([0-9]*\) *.*$/\1/p'`
fi
if [ $FREEMEM -gt $RESIDMEM ]; then
BUFFERMEM=`expr $FREEMEM - $RESIDMEM`
DATASEGSIZE=`ulimit -d`
if ! [ $DATASEGSIZE = unlimited ] &&
[ $BUFFERMEM -gt $DATASEGSIZE ]; then
BUFFERMEM=$DATASEGSIZE
echo "WARNING: kernel limits buffering to $BUFFERMEM KB"
else
BUFFERMEM=`expr $BUFFERMEM / 1024`
fi
FRISBEE_OPTS="$FRISBEE_OPTS -M $BUFFERMEM"
fi
# Wipe the MBR and partition boot blocks on all disks if reloading
case $STATUS in
*ALLOCATED=emulab-ops/reloading*)
......
Supports Markdown
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