sub slice_dir_port {
my ($self,$slice) = @_;
my ( undef, $dir, $port, undef ) = getgrnam($slice);
+ die "getgrnam $slice: $!" if $!;
warn "# slice_dir_port $slice = $dir $port\n";
return ( $dir, $port );
}
close($fh);
my $slice = $ENV{SLICE} || 's1';
+ $slice =~ s{/.+/(\w+)$}{$1};
my ( $dir, $port ) = $self->slice_dir_port( $slice );
+ $dir ||= $ENV{SLICE};
+ $port ||= 6501;
+
if ( ! $found ) {
$max_uid++;
$dir .= "/$max_uid";
# FIXME update quota only on create?
$self->gearman_do( $self->dir2gearman( $dir, 'quota', 'set' ) => "$found $new_quota" );
- return $found;
+ return 'u' . $found;
}
sub mkbasepath {
my $full_path = "$user->{dir}/.meta/files";
if ( -e $full_path ) {
warn "## refresh_file_list $full_path";
- unlink $full_path;
+ unlink $full_path || warn "unlink $full_path: $!";
+ } else {
+ warn "## refresh_file_list $full_path missing";
}
}