Merge branch 'master' into centos

This commit is contained in:
Stéphane Lesimple 2020-11-18 11:24:18 +01:00 committed by GitHub
commit d6be60e4a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -209,6 +209,20 @@ EOF
exit 1
fi
# if we're under FreeBSD, we must have ACLs enabled on /home (or whatever partition contains it),
# so check for that first
if [ "$OS_FAMILY" = FreeBSD ]; then
action_doing "Running under FreeBSD, verifying if /home is mounted with ACLs..."
home_mp="$(df /home | awk '{ if(NR==2) {print $6;exit} }')"
if ! mount | awk '{ if($3=="'"$home_mp"'"){print;exit} }' | grep -q -w acls; then
action_error "No. Please modify your /etc/fstab accordingly, and run \`mount -u -o acls $home_mp' to apply the change on-the-fly."
exit 1
else
action_done
fi
fi
if [ "${opt[wait]}" = 1 ]; then
action_doing "Touching lockfile to suspend sync, and waiting 3 seconds to ensure it has been picked up..."
# shellcheck disable=SC2064

View file

@ -107,7 +107,7 @@ else {
my $list = $fnret->value;
my @result;
foreach my $id (sort { $list->{$b} <=> $list->{$a} } keys %{$list}) {
foreach my $id (sort { $list->{$a}->{'id'} <=> $list->{$b}->{'id'} } keys %{$list}) {
my $r = $list->{$id};
my $diff =
($r->{timestampend} + $r->{timestampendusec} / 1_000_000) - ($r->{timestamp} + $r->{timestampusec} / 1_000_000);