From: Dirk Koopman Date: Sat, 11 Dec 2021 20:30:25 +0000 (+0000) Subject: wip X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=00cad49a8254a3bedf09f049cae665cdb32057a1;p=spider.git wip --- diff --git a/perl/cluster.pl b/perl/cluster.pl index 69418a3b..06f93eef 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -367,6 +367,8 @@ sub AGWrestart # ############################################################# +chdir $root; + $starttime = $systime = time; $systime_days = int ($systime / 86400); $systime_daystart = $systime_days * 86400; @@ -405,9 +407,9 @@ if (DXSql::init($dsn)) { # determine the real Git build number and branch my $desc; - eval {$desc = `git describe --long`}; + eval {$desc = `git -C $root describe --long`}; if (!$@ && $desc) { - my ($v, $s, $b, $g) = $desc =~ /^([\d.]+)(?:\.(\d+))?-(\d+)-g([0-9a-f]+)/; + my ($v, $s, $b, $g) = $desc =~ /^([\d\.]+)(?:\.(\d+))?-(\d+)-g([0-9a-f]+)/; $version = $v; $subversion = $s || 0; $build = $b || 0; @@ -416,7 +418,7 @@ if (DXSql::init($dsn)) { if (!$@) { my @branch; - eval {@branch = `git branch`}; + eval {@branch = `git -C $root branch`}; unless ($@) { for (@branch) { my ($star, $b) = split /\s+/;