8 use vars qw($dbhost $dbname $dbuser $dbpass $dbport
11 require "$ENV{BFConfDir}/BuildFarmWeb.pl";
13 die "no dbname" unless $dbname;
14 die "no dbuser" unless $dbuser;
16 my $dsn="dbi:Pg:dbname=$dbname";
17 $dsn .= ";host=$dbhost" if $dbhost;
18 $dsn .= ";port=$dbport" if $dbport;
20 my $db = DBI->connect($dsn,$dbuser,$dbpass);
22 die $DBI::errstr unless $db;
24 my $sth = $db->prepare(q[
25 SELECT name, status, operating_system, os_version, sys_owner, owner_email
26 FROM buildsystems AS b
31 printf $user_list_format, "SysName", "Status", "Owner", "Email", "Distro", "Version";
32 while (my $row = $sth->fetchrow_hashref)
34 printf $user_list_format,
35 $row->{name}, $row->{status}, $row->{sys_owner},
36 $row->{owner_email}, $row->{operating_system},