git://git.exim.org
/
buildfarm-server.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Donne with 4.next; add 4.93:fixes
[buildfarm-server.git]
/
scripts
/
rename_system.pl
diff --git
a/scripts/rename_system.pl
b/scripts/rename_system.pl
index 4a61c770fb058e46ae1fa20c0a158ae2f7dfabb1..9cee13fc635dba98530be37a8ff5fbd891201416 100755
(executable)
--- a/
scripts/rename_system.pl
+++ b/
scripts/rename_system.pl
@@
-8,8
+8,11
@@
use Data::Dumper;
die "Must pass current and new sysnames\n" unless scalar @ARGV == 2;
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
die "Must pass current and new sysnames\n" unless scalar @ARGV == 2;
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
+ $user_list_format
);
);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
@@
-36,11
+39,12
@@
my $sth = $db->prepare(q[
]);
$sth->execute();
]);
$sth->execute();
-my $format = "%-10s %-10s %-18s %-20s %-18s %-s\n";
-
printf $format,
"SysName", "Status", "Owner", "Email", "Distro", "Version";
+printf $user_list_format,
+
"SysName", "Status", "Owner", "Email", "Distro", "Version";
while (my $row = $sth->fetchrow_hashref)
{
while (my $row = $sth->fetchrow_hashref)
{
- printf $format, $row->{name}, $row->{status}, $row->{sys_owner},
+ printf $user_list_format,
+ $row->{name}, $row->{status}, $row->{sys_owner},
$row->{owner_email}, $row->{operating_system},
$row->{os_version};
}
$row->{owner_email}, $row->{operating_system},
$row->{os_version};
}