Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-stable
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
emulab
emulab-stable
Commits
1d8d0b43
Commit
1d8d0b43
authored
Jul 20, 2005
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hook FlySpray interface in. mkproj, tbacct, and setgroups ...
parent
111d93d7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
10 deletions
+45
-10
GNUmakefile.in
GNUmakefile.in
+6
-1
account/tbacct.in
account/tbacct.in
+15
-0
bugdb/bugdbsetup.in
bugdb/bugdbsetup.in
+5
-5
defs-default
defs-default
+1
-0
tbsetup/mkproj.in
tbsetup/mkproj.in
+6
-0
tbsetup/setgroups.in
tbsetup/setgroups.in
+12
-4
No files found.
GNUmakefile.in
View file @
1d8d0b43
...
...
@@ -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
...
...
account/tbacct.in
View file @
1d8d0b43
...
...
@@ -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
;
...
...
bugdb/bugdbsetup.in
View file @
1d8d0b43
...
...
@@ -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
"
...
...
defs-default
View file @
1d8d0b43
...
...
@@ -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
...
...
tbsetup/mkproj.in
View file @
1d8d0b43
...
...
@@ -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!
");
...
...
tbsetup/setgroups.in
View file @
1d8d0b43
...
...
@@ -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 do
n'
t want to run this script unless its the real version.
# We do
no
t 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!
");
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment