Skip to content
GitLab
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
65b00718
Commit
65b00718
authored
Nov 22, 2010
by
Kevin Atkinson
Browse files
Fixes from mike, to better format the output of rc.blobs.
This including redirecting Frisbee output to a logfile.
parent
086192ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/common/config/rc.blobs
View file @
65b00718
...
...
@@ -98,9 +98,9 @@ sub doboot()
my
$errors
=
0
;
my
$need_mkextrafs
=
1
;
if
(
-
e
"
/var/emulab/boot
/rc.blobs-ran
")
{
print
STDOUT
"
Blobs installation already
ran on this nod
e.
\n
";
print
STDOUT
"
Remove
/var/emulab/boot
/rc.blobs-ran to run again.
\n
";
if
(
-
e
"
$BOOTDIR
/rc.blobs-ran
")
{
print
STDOUT
"
Blobs installation already
don
e.
\n
";
print
STDOUT
"
(
Remove
$BOOTDIR
/rc.blobs-ran to run again.
)
\n
";
exit
0
;
}
...
...
@@ -112,6 +112,7 @@ sub doboot()
return
if
(
!
@blobs
);
unlink
("
$LOGDIR
/blobs.log
");
foreach
my
$blob
(
@blobs
)
{
eval
{
(
$mcastaddr
,
$portnum
,
undef
,
$basename
,
$dest
)
=
...
...
@@ -120,14 +121,15 @@ sub doboot()
# FIXME: Make sure $basename doesn't exist...
my
$local_path
=
"
/var/tmp/
$basename
";
my
$frisbee_cmd
=
"
$FRISBEE
-p
$portnum
-m
$mcastaddr
$local_path
";
my
$frisbee_cmd
=
"
$FRISBEE
-p
$portnum
-m
$mcastaddr
$local_path
"
.
"
>>
$LOGDIR
/blobs.log 2>&1
";
if
(
$dest
=~
/^\/local/
&&
$need_mkextrafs
)
{
os_mountextrafs
("
/local
");
$need_mkextrafs
=
0
;
}
print
STDOUT
"
Fetch
ing blob
$basename
to
$local_path
and unpacking to
$dest
\n
";
print
STDOUT
"
Download
ing blob
$basename
to
$local_path
\n
";
#print STDOUT "$frisbee_cmd\n";
# launch frisbee
...
...
@@ -135,11 +137,13 @@ sub doboot()
die
"
Frisbee failed
\n
";
}
my
$unpack_cmd
=
"
$TARINSTALL
-f
$dest
$local_path
";
print
STDOUT
"
Unpacking to
$dest
\n
";
my
$unpack_cmd
=
"
$TARINSTALL
-f
$dest
$local_path
"
.
"
>>
$LOGDIR
/blobs.log 2>&1
";
#print STDOUT "$unpack_cmd\n";
if
(
system
(
$unpack_cmd
))
{
if
(
$?
>>
8
==
255
)
{
die
"
Tarinstall failed
\n
";
die
"
Tarinstall failed
(see
$LOGDIR
/blobs.log)
\n
";
}
}
...
...
@@ -154,7 +158,7 @@ sub doboot()
}
if
(
!
$errors
)
{
system
("
touch
/var/emulab/boot
/rc.blobs-ran
");
system
("
touch
$BOOTDIR
/rc.blobs-ran
");
}
exit
(
$errors
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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