All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 348d7009 authored by Leigh B Stoller's avatar Leigh B Stoller

Create /usr/testbed/log/logfiles/{00,FF} subdirs for long term storage

of logfiles.

Lbs
parent 10b3eecc
#
# Add logfiles storage.
#
use strict;
use libinstall;
use installvars;
my $LOGFILESTORE = "$TBROOT/log/logfiles";
sub Install($$$)
{
my ($server, $isupdate, $impotent) = @_;
return 0
if ($isupdate);
Phase "logdir", "Creating $LOGFILESTORE", sub {
DoneIfExists("$LOGFILESTORE");
mkdir "$LOGFILESTORE",0777 or
PhaseFail("Unable to create $LOGFILESTORE $!");
};
my @list = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "a", "b", "c", "d", "e", "f");
Phase "logsubdirs", "Creating subdirs in $LOGFILESTORE", sub {
foreach my $a (@list) {
foreach my $b (@list) {
my $dir = "$LOGFILESTORE/${a}${b}";
Phase "logsubdir", "Creating $dir", sub {
DoneIfExists("$dir");
mkdir "$dir",0777 or
PhaseFail("Unable to create $dir $!");
};
}
}
};
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
#
# Add logfiles storage.
#
use strict;
use libinstall;
use installvars;
my $LOGFILESTORE = "$TBROOT/log/logfiles";
sub InstallUpdate($$)
{
my ($version, $phase) = @_;
#
# If something should run in the pre-install phase.
#
if ($phase eq "pre") {
Phase "logdir", "Creating $LOGFILESTORE", sub {
DoneIfExists("$LOGFILESTORE");
mkdir "$LOGFILESTORE",0777 or
PhaseFail("Unable to create $LOGFILESTORE $!");
ExecQuietFatal("$CHMOD 777 $LOGFILESTORE");
};
my @list = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "a", "b", "c", "d", "e", "f");
Phase "logsubdirs", "Creating subdirs in $LOGFILESTORE", sub {
foreach my $a (@list) {
foreach my $b (@list) {
my $dir = "$LOGFILESTORE/${a}${b}";
Phase "logsubdir", "Creating $dir", sub {
DoneIfExists("$dir");
mkdir "$dir",0777 or
PhaseFail("Unable to create $dir $!");
ExecQuietFatal("$CHMOD 777 $dir");
};
}
}
};
}
#
# If something should run in the post-install phase.
#
if ($phase eq "post") {
;
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
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