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
bf02857e
Commit
bf02857e
authored
Jun 08, 2001
by
Mac Newbold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added db/genelists and made the associated changes in configure/make files.
parent
965565da
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
3 deletions
+91
-3
GNUmakefile.in
GNUmakefile.in
+1
-0
configure
configure
+1
-1
configure.in
configure.in
+1
-1
db/GNUmakefile.in
db/GNUmakefile.in
+6
-1
db/genelists.in
db/genelists.in
+82
-0
No files found.
GNUmakefile.in
View file @
bf02857e
...
@@ -23,6 +23,7 @@ boss-install: install-subdirs install-mkdirs
...
@@ -23,6 +23,7 @@ boss-install: install-subdirs install-mkdirs
@echo "DON'T FORGET TO RUN A POST-INSTALL AS ROOT"
@echo "DON'T FORGET TO RUN A POST-INSTALL AS ROOT"
post-install:
post-install:
@$(MAKE) -C db post-install
@$(MAKE) -C ipod post-install
@$(MAKE) -C ipod post-install
@$(MAKE) -C tbsetup post-install
@$(MAKE) -C tbsetup post-install
@$(MAKE) -C security post-install
@$(MAKE) -C security post-install
...
...
configure
View file @
bf02857e
...
@@ -925,7 +925,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
...
@@ -925,7 +925,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
assign/GNUmakefile
\
assign/GNUmakefile
\
capture/GNUmakefile
\
capture/GNUmakefile
\
db/GNUmakefile db/nalloc db/nfree db/if2port db/backup
\
db/GNUmakefile db/nalloc db/nfree db/if2port db/backup
\
db/webcontrol db/node_status discvr/GNUmakefile
\
db/webcontrol db/node_status d
b/genelists d
iscvr/GNUmakefile
\
db/libdb.pm
\
db/libdb.pm
\
ipod/GNUmakefile
\
ipod/GNUmakefile
\
lib/GNUmakefile
\
lib/GNUmakefile
\
...
...
configure.in
View file @
bf02857e
...
@@ -98,7 +98,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
...
@@ -98,7 +98,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
assign/GNUmakefile \
assign/GNUmakefile \
capture/GNUmakefile \
capture/GNUmakefile \
db/GNUmakefile db/nalloc db/nfree db/if2port db/backup \
db/GNUmakefile db/nalloc db/nfree db/if2port db/backup \
db/webcontrol db/node_status discvr/GNUmakefile \
db/webcontrol db/node_status d
b/genelists d
iscvr/GNUmakefile \
db/libdb.pm \
db/libdb.pm \
ipod/GNUmakefile \
ipod/GNUmakefile \
lib/GNUmakefile \
lib/GNUmakefile \
...
...
db/GNUmakefile.in
View file @
bf02857e
...
@@ -9,7 +9,8 @@ SUBDIR = db
...
@@ -9,7 +9,8 @@ SUBDIR = db
include $(OBJDIR)/Makeconf
include $(OBJDIR)/Makeconf
BIN_SCRIPTS = mac2if nalloc nfree nodeip
BIN_SCRIPTS = mac2if nalloc nfree nodeip
SBIN_SCRIPTS = avail inuse showgraph if2port backup webcontrol node_status
SBIN_SCRIPTS = avail inuse showgraph if2port backup webcontrol node_status \
genelists
LIBEXEC_SCRIPTS = ptopgen
LIBEXEC_SCRIPTS = ptopgen
LIB_SCRIPTS = libdb.pm
LIB_SCRIPTS = libdb.pm
...
@@ -29,6 +30,10 @@ install: $(addprefix $(INSTALL_BINDIR)/, $(BIN_SCRIPTS)) \
...
@@ -29,6 +30,10 @@ install: $(addprefix $(INSTALL_BINDIR)/, $(BIN_SCRIPTS)) \
$(addprefix $(INSTALL_LIBDIR)/, $(LIB_SCRIPTS)) \
$(addprefix $(INSTALL_LIBDIR)/, $(LIB_SCRIPTS)) \
$(addprefix $(INSTALL_LIBEXECDIR)/, $(LIBEXEC_SCRIPTS))
$(addprefix $(INSTALL_LIBEXECDIR)/, $(LIBEXEC_SCRIPTS))
post-install:
chown root $(INSTALL_SBINDIR)/genelists
chmod u+s $(INSTALL_SBINDIR)/genelists
#
#
# Control node installation (okay, plastic)
# Control node installation (okay, plastic)
#
#
...
...
db/genelists.in
0 → 100644
View file @
bf02857e
#!/usr/bin/perl -wT
use
English
;
#use Getopt::Std;
sub
usage
()
{
print
STDOUT
"
Usage: genelists
\n
"
.
"
Generate the email list files after things change
\n
";
exit
(
-
1
);
}
my
$optlist
=
"";
# Configure variables
my
$TB
=
"
@prefix
@
";
my
$TBOPS
=
"
@TBOPSEMAIL
@
";
my
$lockfile
=
"
/var/tmp/testbed_genelists_lockfile
";
my
$active
=
0
;
my
$userlist
=
0
;
my
$d
=
0
;
if
(
@ARGV
!=
0
)
{
usage
();
}
$|
=
1
;
# Turn off line buffering on output
# Load the Testbed support stuff.
push
(
@INC
,
"
$TB
/lib
");
require
libdb
;
foreach
$active
(
0
,
1
)
{
if
(
$active
)
{
print
"
Getting Active Users
\n
"
if
$d
;
# All active users on the testbed
if
(
!
(
$query_result
=
DBQuery
("
SELECT DISTINCT u.usr_email from experiments as e
"
.
"
left join proj_memb as p on e.pid=p.pid
"
.
"
left join users as u on u.uid=p.uid
"
.
"
where u.status='active' order by u.usr_email
"))
)
{
DBFatal
("
Getting Active Users!
");
}
$userlist
=
"
testbed-ops
\@
flux.cs.utah.edu
testbed-active-users-archive
\@
flux.cs.utah.edu
\n
";
open
(
LIST
,"
>/mnt/usr/site/lib/lists/testbed-active-users
")
||
die
("
Couldn't open testbed-active-users: $!
\n
");
print
"
Opened testbed-active-users
\n
"
if
$d
;
}
else
{
print
"
Getting All Users
\n
"
if
$d
;
# All approved users on the testbed
if
(
!
(
$query_result
=
DBQuery
("
SELECT DISTINCT usr_email FROM users
"
.
"
where status='active' order by usr_email
"))
)
{
DBFatal
("
Getting Users!
");
}
$userlist
=
"
testbed-ops
\@
flux.cs.utah.edu
testbed-users-archive
\@
flux.cs.utah.edu
\n
";
open
(
LIST
,"
>/mnt/usr/site/lib/lists/testbed-users
")
||
die
("
Couldn't open testbed-users: $!
\n
");
print
"
Opened testbed-users list
\n
"
if
$d
;
}
for
(
$i
=
0
;
$i
<
$query_result
->
numrows
;
$i
++
)
{
$user_email
=
(
$query_result
->
fetchrow_array
())[
0
];
if
(
!
defined
(
$user_email
))
{
next
;
}
if
(
$userlist
)
{
$userlist
.=
"
$user_email
\n
";
}
else
{
$userlist
=
"
$user_email
\n
";
}
}
print
LIST
$userlist
;
print
$userlist
if
$d
;
close
(
LIST
);
}
exit
0
;
sub
fatal
{
local
(
$msg
)
=
$_
[
0
];
system
("
echo
\"
$msg
\"
| /usr/bin/mail
"
.
"
-s 'TESTBED: Failure Generating Email Lists'
$TBOPS
");
die
(
$msg
);
}
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