Commit 1d8d0b43 authored by Leigh Stoller's avatar Leigh Stoller

Hook FlySpray interface in. mkproj, tbacct, and setgroups ...

parent 111d93d7
......@@ -26,7 +26,7 @@ include Makeconf
SUBDIRS = lib db assign www @optional_subdirs@ ipod security sensors \
pxe tbsetup account tmcd utils tip capture ipod vis \
sensors os xmlrpc install/newnode_sshkeys mote tools/whol \
wiki
wiki bugdb
all: all-subdirs
......@@ -61,12 +61,17 @@ endif
@$(MAKE) -C mote post-install
@$(MAKE) -C tools post-install
@$(MAKE) -C wiki post-install
@$(MAKE) -C bugdb post-install
@$(MAKE) -C utils post-install
#
# For installation on the 'ops' or 'users' node (okay, plastic)
#
ops-install:
-mkdir -p $(INSTALL_TOPDIR)/log
-mkdir -p $(INSTALL_TOPDIR)/log/mysql
-chmod 770 $(INSTALL_TOPDIR)/log/mysql
-chown mysql.mysql $(INSTALL_TOPDIR)/log/mysql
@$(MAKE) -C tbsetup control-install
@$(MAKE) -C security control-install
@$(MAKE) -C tip control-install
......
......@@ -41,6 +41,7 @@ my $CONTROL = "@USERNODE@";
my $BOSSNODE = "@BOSSNODE@";
my $WITHSFS = @SFSSUPPORT@;
my $WIKISUPPORT = @WIKISUPPORT@;
my $BUGDBSUPPORT= @BUGDBSUPPORT@;
my $PROTOUSER = 'elabman';
my $SAMBANODE = "fs"; # DNS makes this do the right thing in E-in-E.
......@@ -62,6 +63,8 @@ my $PBAG = "$TB/sbin/paperbag";
my $EXPORTSSETUP= "$TB/sbin/exports_setup";
my $ADDWIKIUSER = "$TB/sbin/addwikiuser";
my $DELWIKIUSER = "$TB/sbin/delwikiuser";
my $ADDBUGDBUSER= "$TB/sbin/addbugdbuser";
my $DELBUGDBUSER= "$TB/sbin/delbugdbuser";
my $NOLOGIN = "/sbin/nologin";
my $SSH = "$TB/bin/sshtb";
my $SAVEUID = $UID;
......@@ -301,6 +304,10 @@ sub AddUser()
system("$ADDWIKIUSER $user")
if ($WIKISUPPORT && !$batch);
# And to the bugdb if enabled.
system("$ADDBUGDBUSER $user")
if ($BUGDBSUPPORT && !$batch);
$EUID = 0;
return 0;
}
......@@ -353,6 +360,10 @@ sub AddUser()
system("$ADDWIKIUSER $user")
if ($WIKISUPPORT && !$batch && $user ne $PROTOUSER);
# And to the bugdn if enabled.
system("$ADDBUGDBUSER $user")
if ($BUGDBSUPPORT && !$batch && $user ne $PROTOUSER);
# Generate the SSL cert for the user.
system("$MKUSERCERT $user");
......@@ -471,6 +482,10 @@ sub UpdatePassword()
# And to the wiki if enabled.
system("$ADDWIKIUSER -u $user")
if ($WIKISUPPORT && $user ne $PROTOUSER);
# And to the bugdb if enabled.
system("$ADDBUGDBUSER -m $user")
if ($BUGDBSUPPORT && $user ne $PROTOUSER);
$EUID = 0;
return 0;
......
......@@ -88,8 +88,8 @@ if (@ARGV) {
$query_result =
DBQueryFatal("select pid from projects ".
"where approved=1 ".
" and (pid='testbed' or pid='emulab-ops' or pid='tbres' or ".
" pid='utahstud')" .
# " and (pid='testbed' or pid='emulab-ops' or pid='tbres' or ".
# " pid='utahstud')" .
"");
while (my ($pid) = $query_result->fetchrow_array()) {
......@@ -110,9 +110,9 @@ $query_result =
" from group_membership as g ".
"left join users as u on u.uid=g.uid ".
"where u.status='active' and g.trust!='none' ".
" and (g.pid='testbed' or g.pid='emulab-ops' or ".
" g.pid='tbres' or g.pid='utahstud')" .
"order by u.admin");
# " and (g.pid='testbed' or g.pid='emulab-ops' or ".
# " g.pid='tbres' or g.pid='utahstud')" .
"");
while (my ($uid) = $query_result->fetchrow_array()) {
print "Adding user $uid to bugdb\n"
......
......@@ -35,6 +35,7 @@ THISHOMEBASE=Emulab.Net
PLABSUPPORT=1
PLAB_ROOTBALL="plabroot-10.tar.bz2"
WIKISUPPORT=1
BUGDBSUPPORT=1
WINSUPPORT=1
SFSSUPPORT=0
CVSSUPPORT=1
......
......@@ -31,8 +31,10 @@ my $CVSBIN = "/usr/bin/cvs";
my $CHOWN = "/usr/sbin/chown";
my $GRANTTYPE= "$TB/sbin/grantnodetype -d";
my $WIKISUPPORT = @WIKISUPPORT@;
my $BUGDBSUPPORT= @BUGDBSUPPORT@;
my $CVSSUPPORT = @CVSSUPPORT@;
my $ADDWIKIPROJ = "$TB/sbin/addwikiproj";
my $ADDBUGDBPROJ= "$TB/sbin/addbugdbproj";
my $PROJROOT = "/proj";
my $GRPROOT = "/groups";
......@@ -137,6 +139,10 @@ if ($WIKISUPPORT) {
system("$ADDWIKIPROJ $pid") == 0 or
fatal("$ADDWIKIPROJ $pid failed!");
}
if ($BUGDBSUPPORT) {
system("$ADDBUGDBPROJ $pid") == 0 or
fatal("$ADDBUGDBPROJ $pid failed!");
}
system("$MKACCT $projhead") == 0 or
fatal("$MKACCT $projhead failed!");
......
......@@ -44,7 +44,9 @@ my $BOSSNODE= "@BOSSNODE@";
my $ADMINGRP= "@TBADMINGROUP@";
my $ELABINELAB = @ELABINELAB@;
my $WIKISUPPORT = @WIKISUPPORT@;
my $BUGDBSUPPORT = @BUGDBSUPPORT@;
my $SETWIKIGROUPS = "$TB/sbin/setwikigroups";
my $SETBUGDBGROUPS= "$TB/sbin/setbugdbgroups";
my $SSH = "$TB/bin/sshtb";
my $GENELISTS="$TB/sbin/genelists";
......@@ -85,7 +87,7 @@ use libdb;
use libtestbed;
#
# We don't want to run this script unless its the real version.
# We do not want to run this script unless its the real version.
#
if ($EUID != 0) {
die("*** $0:\n".
......@@ -388,13 +390,19 @@ else {
}
# and the twiki.
if ($WIKISUPPORT) {
if ($WIKISUPPORT || $BUGDBSUPPORT) {
$UID = $SAVEUID;
$EUID = $UID;
foreach $user (@userlist) {
system("$SETWIKIGROUPS $user") == 0 or
fatal("$SETWIKIGROUPS $user failed!");
if ($WIKISUPPORT) {
system("$SETWIKIGROUPS $user") == 0 or
fatal("$SETWIKIGROUPS $user failed!");
}
if ($BUGDBSUPPORT) {
system("$SETBUGDBGROUPS $user") == 0 or
fatal("$SETBUGDBGROUPS $user failed!");
}
}
}
......
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