Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
0d37e7fc
Commit
0d37e7fc
authored
Jul 13, 2011
by
Leigh B Stoller
Browse files
Merge branch 'protogeni'
parents
fba22405
e12ff3a3
Changes
3
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniCM.pm.in
View file @
0d37e7fc
...
...
@@ -2654,8 +2654,10 @@ sub SliverWorkAux($$$$$$$)
#
# Must do this after the mapper runs.
#
if (system("$TARFILES_SETUP $pid $eid")) {
print STDERR "Could not setup tarfiles\n";
$output = GeniUtil::ExecQuiet("$TARFILES_SETUP -q $pid $eid");
if ($?) {
$message = "Could not setup tarfiles:\n$output";
print STDERR $message;
goto bad;
}
...
...
tbsetup/fetchtar.proxy.in
View file @
0d37e7fc
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2003
, 2004, 2005, 2006
University of Utah and the Flux Group.
# Copyright (c) 2003
-2011
University of Utah and the Flux Group.
# All rights reserved.
#
use
English
;
use
Getopt::
Std
;
use
BSD::
Resource
;
...
...
@@ -17,10 +15,13 @@ use POSIX qw(:signal_h);
#
sub
usage
()
{
print
"
Usage: $0 -u user URL localfile
\n
";
print
"
Usage: $0
[-q]
-u user URL localfile
\n
";
exit
(
-
1
);
}
my
$optlist
=
"
qu:
";
my
$quiet
=
0
;
my
$user
;
#
# Configure variables
...
...
@@ -62,16 +63,19 @@ if ($UID != 0) {
"
Must be root to run this script!
");
}
if
(
@ARGV
!=
4
)
{
my
%options
=
();
if
(
!
getopts
(
$optlist
,
\
%options
))
{
usage
();
}
if
((
shift
@ARGV
)
ne
'
-u
')
{
die
("
*** $0:
\n
"
.
"
Improper first argument. Must be the user name!
\n
");
if
(
defined
(
$options
{"
q
"}))
{
$quiet
=
1
;
}
if
(
defined
(
$options
{"
u
"}))
{
$user
=
$options
{"
u
"};
}
if
(
@ARGV
!=
2
||
!
defined
(
$user
))
{
usage
();
}
my
$user
=
shift
@ARGV
;
my
$URL
=
shift
@ARGV
;
my
$localfile
=
shift
@ARGV
;
...
...
@@ -160,7 +164,7 @@ if (! $pid) {
# Give parent a chance to react.
sleep
(
1
);
exec
("
nice -15
$WGET
-
-timestamping --no-verbose
-O
$localfile
$URL
");
exec
("
nice -15
$WGET
-
q
-O
$localfile
$URL
");
die
("
Could not exec wget!
\n
");
}
...
...
@@ -182,7 +186,8 @@ if (($exit_status & 0xff) == SIGKILL) {
print
STDERR
"
***
$msg
\n
";
exit
(
15
);
}
elsif
(
$exit_status
)
{
print
STDERR
"
*** wget exited with status
$exit_status
\n
";
print
STDERR
"
*** wget exited with status
$exit_status
\n
"
if
(
!
$quiet
);
}
else
{
#
# Change the permissions on the file so that other group members can
...
...
tbsetup/tarfiles_setup.in
View file @
0d37e7fc
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2003-20
08
University of Utah and the Flux Group.
# Copyright (c) 2003-20
11
University of Utah and the Flux Group.
# All rights reserved.
#
use
English
;
use
Getopt::
Std
;
use
Socket
;
...
...
@@ -25,10 +23,12 @@ use Socket;
sub
usage
()
{
print
"
Usage: $0 pid eid
\n
";
print
"
Usage: $0
[-q]
pid eid
\n
";
exit
(
-
1
);
}
my
$optlist
=
"
q
";
my
$quiet
=
0
;
#
# Functions
...
...
@@ -84,6 +84,13 @@ use libArchive;
use
Experiment
;
use
User
;
my
%options
=
();
if
(
!
getopts
(
$optlist
,
\
%options
))
{
usage
();
}
if
(
defined
(
$options
{"
q
"}))
{
$quiet
=
1
;
}
if
(
@ARGV
!=
2
)
{
usage
();
}
...
...
@@ -286,12 +293,15 @@ if ($TESTMODE) {
# Actually fetch the tarballs
#
while
(
my
(
$URL
,
$localfile
)
=
each
%tofetch
)
{
print
"
Fetching
$URL
to
$localfile
\n
";
print
"
Fetching
$URL
to
$localfile
\n
"
if
(
!
$quiet
);
#
# Build up a new command line to do the fetch on ops
#
my
$cmdargs
=
"
$TB
/bin/fetchtar.proxy
";
$cmdargs
.=
"
-q
"
if
(
$quiet
);
$cmdargs
.=
"
-u
$user_uid
$URL
$localfile
";
#
...
...
@@ -302,7 +312,7 @@ while (my ($URL, $localfile) = each %tofetch) {
$EUID
=
$UID
=
$SAVEUID
;
if
(
$?
)
{
tbdie
("
Fetch of Tarball/RPM failed
!
");
tbdie
("
Fetch of Tarball/RPM failed
:
$URL
");
}
}
...
...
Write
Preview
Supports
Markdown
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