Commit bb9255ee 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 b8ad48ee 773d78ce
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005-2007 University of Utah and the Flux Group.
# Copyright (c) 2005-2010 University of Utah and the Flux Group.
# All rights reserved.
#
package Archive;
......@@ -32,7 +32,7 @@ use overload ('""' => 'Stringify');
my $TB = "@prefix@";
my $MAINSITE = @TBMAINSITE@;
my $ARCHSUPPORT = @ARCHIVESUPPORT@;
my $USEARCHIVE = ($MAINSITE || $ARCHSUPPORT);
my $USEARCHIVE = $ARCHSUPPORT;
my %ALLOWEDPID = ("testbed" => 1);
# XXX
my $ARCHIVEDIR = "/usr/testbed/exparchive";
......
......@@ -369,9 +369,12 @@ if ($install) {
fatal("Could not kill(TERM) process $dpid (dhcpd): $!");
}
my $old_uid = $UID;
$UID = $EUID;
for my $subboss (keys %subboss_dhcp_servers) {
RestartSubbossDhcp($subboss, $restart);
}
$UID = $old_uid;
}
TBScriptUnlock();
......@@ -394,7 +397,7 @@ sub fatal {
sub RestartSubbossDhcp($$)
{
my ($subboss, $restart) = @_;
my $cmd = "ssh $subboss @prefix@/sbin/subboss_dhcpd_makeconf";
$cmd .= " -r" if ($restart);
......
......@@ -61,7 +61,7 @@ CVSSUPPORT=1
STAMPS=1
CHATSUPPORT=1
NFSTRACESUPPORT=1
ARCHIVESUPPORT=1
ARCHIVESUPPORT=0
OPSDBSUPPORT=1
PELABSUPPORT=1
PLABSUPPORT=1
......
# New ports collection makefile for: emulab-php5
# Date created: 09 February 2006
# Whom: stoller@flux.utah.edu
#
# These are for the php5-extensions port
#
WITH_XMLRPC=yes
WITH_CURL=yes
WITH_OPENSSL=yes
WITH_BZ2=yes
WITH_GD=yes
WITH_MCRYPT=yes
WITH_MYSQL=yes
WITH_XML=yes
# Additions for mediawiki
#WITH_ICONV=yes
#WITH_READLINE=yes
#WITH_MBSTRING=yes
WITHOUT_SQLITE=true
WITHOUT_PDO_SQLITE=true
#
# For the PHP ports, so they will depend on the actual version of apache we're
# installing
#
APACHE_PORT=www/apache13-modssl
#
# This prevents the option screen.
#
BATCH=yes
#
# But need this too!
#
.MAKEFLAGS+= -DBATCH APACHE_PORT=www/apache13-modssl
.include "../../lang/php5-extensions/Makefile"
Meta-port to make sure the proper php5 extensions required for an emulab
boss,ops node.
@comment This packing list left intentionally empty
......@@ -1470,12 +1470,10 @@ sub Credential2SliceAggregate($)
my $slice;
my $aggregate;
print STDERR "Credential2SliceAggregate target_urn = $target_urn\n";
# First try the target urn, then fall back to the uuid
$slice = GeniSlice->Lookup($target_urn);
if (! defined($slice)) {
# Could not find it by urn, trying uuid
print STDERR "Credential2SliceAggregate target_uuid = $target_uuid\n";
$slice = GeniSlice->Lookup($target_uuid);
}
if (defined($slice)) {
......
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005, 2006, 2007 University of Utah and the Flux Group.
# Copyright (c) 2005-2010 University of Utah and the Flux Group.
# All rights reserved.
#
# XXX Need to deal with locking at some point ...
......@@ -33,7 +33,7 @@ use Time::HiRes qw(gettimeofday);
my $TB = "@prefix@";
my $MAINSITE = @TBMAINSITE@;
my $ARCHSUPPORT = @ARCHIVESUPPORT@;
my $USEARCHIVE = ($MAINSITE || $ARCHSUPPORT);
my $USEARCHIVE = $ARCHSUPPORT;
my $ZIPINFO = "/usr/local/bin/zipinfo";
my $TAR = "/usr/bin/tar";
......
......@@ -197,8 +197,8 @@ my $experiment = Experiment->Lookup($pid, $eid);
if (!defined($experiment)) {
tbdie("Could not lookup experiment object!")
}
my $special = ($pid eq "testbed" || $pid eq "tbres" ||
$pid eq "emulab-ops" || $pid eq "utahstud");
my $special = ($pid eq "testbed" || $pid eq "tbres" || $pid eq "geni" ||
$pid eq "emulab-ops" || $pid eq "utahstud" || $pid eq "ResiliNets");
my $newsetup = $special;
#
......
......@@ -32,25 +32,51 @@ my $TBDIR = "/usr/testbed";
my ($bossname, $outer_bossip) = tmccbossinfo();
sub fix_syslog_conf()
{
my @buffer;
open SYSLOG_CONF, "+</etc/syslog.conf" or
Fatal("Couldn't open syslog.conf for writing");
while (<SYSLOG_CONF>) {
next if (/dhcp/i || /tftp/i);
push @buffer, $_;
}
seek SYSLOG_CONF, 0, 0;
print SYSLOG_CONF $_ for @buffer;
print SYSLOG_CONF "!dhcpd\n";
print SYSLOG_CONF "*.*\t\t\t\t\t\t/usr/testbed/log/dhcpd.log\n";
print SYSLOG_CONF "!tftpd\n";
print SYSLOG_CONF "*.*\t\t\t\t\t\t/usr/testbed/log/tftpd.log\n";
print SYSLOG_CONF "!frisbeed\n";
print SYSLOG_CONF "*.*\t\t\t\t\t\t/usr/testbed/log/frisbeed.log\n";
close SYSLOG_CONF;
}
sub doboot()
{
my $EXTRAFS = "/z";
my $TFTPBOOT_DIR = "$EXTRAFS/tftpboot";
my $LOG_DIR = "$EXTRAFS/log";
my $IMAGES_DIR = "$EXTRAFS/image_cache";
my $stuffdir = "$EXTRAFS/tmp";
my $MFSTARBALL = "tftpboot-subboss.tar.gz";
goto skipsetup if (!SUBBOSS());
print "Stopping tftpd (if running)";
print "Stopping tftpd (if running)\n ";
# This needs to be system(), not mysystem since we don't
# care if it fails.
system("/usr/local/etc/rc.d/tftpd-hpa.sh stop");
RecreateDir($EXTRAFS,1);
mysystem("$BINDIR/mkextrafs.pl -f $EXTRAFS");
mysystem("mkdir -p $TFTPBOOT_DIR $IMAGES_DIR $stuffdir");
mysystem("mkdir -p $TFTPBOOT_DIR $IMAGES_DIR $LOG_DIR $stuffdir");
mysystem("ln -sf $TFTPBOOT_DIR /tftpboot");
mysystem("ln -sf $IMAGES_DIR $TB/image_cache");
mysystem("ln -sf $IMAGES_DIR $TBDIR/image_cache");
mysystem("ln -sf $LOG_DIR $TBDIR/log");
print "Copying over tftpboot tar file from web server and unpacking\n";
......@@ -63,8 +89,11 @@ sub doboot()
mysystem("tar xzf $stuffdir/tftpboot.tar.gz -C /tftpboot");
# FIXME clean up stuffdir?
print "Restarting tftpd";
print "Restarting tftpd\n ";
mysystem("/usr/local/etc/rc.d/tftpd-hpa.sh start");
print "Configuring syslogd\n ";
fix_syslog_conf();
skipsetup:
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2001-2006 University of Utah and the Flux Group.
* Copyright (c) 2001-2010 University of Utah and the Flux Group.
* All rights reserved.
*
* BSD code derived from:
......@@ -133,7 +133,8 @@ find_iface(char *macaddr)
struct if_msghdr *ifm;
struct ifa_msghdr *ifam;
struct sockaddr_dl *sdl;
char *buf, *lim, *next, *cp, *name;
char *buf, *lim, *next, *cp;
char name[IFNAMSIZ];
size_t needed;
int n, addrs, mib[6];
......@@ -181,7 +182,11 @@ find_iface(char *macaddr)
cp = (char *)LLADDR(sdl);
if ((n = sdl->sdl_alen) <= 0 || sdl->sdl_type != IFT_ETHER)
continue;
name = sdl->sdl_data;
memcpy(name, sdl->sdl_data,
sizeof(name) < sdl->sdl_nlen ?
sizeof(name)-1 : sdl->sdl_nlen);
name[sizeof(name) < sdl->sdl_nlen ?
sizeof(name)-1 : sdl->sdl_nlen] = '\0';
if (addrtype == ADDR_MAC) {
char enet[BUFSIZ], *bp = enet;
......
......@@ -209,6 +209,7 @@ write_image()
if [ $protocol = frisbee ]; then
[ -n "$server" ] || server=$BOSSIP
echo "$BINDIR/frisbee -m $address -p $port -S $server $frisbee_opts $disk"
$BINDIR/frisbee -m $address -p $port -S $server $frisbee_opts $disk
rc=$?
......
......@@ -4291,7 +4291,7 @@ class subboss:
output="Node is not reserved: " + res[0][0])
# Must be a subboss.
if int(res[0][3]) != "subboss":
if res[0][1] != "subboss":
return EmulabResponse(RESPONSE_FORBIDDEN,
output="Not a subboss");
......@@ -4972,7 +4972,7 @@ class elabinelab:
stuff += l
pass
return EmulabResponse(RESPONSE_SUCCESS, value=stuff, output=output)
return EmulabResponse(RESPONSE_SUCCESS, output=output)
#
# Fire up a frisbeed for an image,
#
......
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