[Netpass-devel] NetPass/lib/NetPass Config.pm,1.52,1.53 DB.pm,1.53,1.54
Brought to you by:
jeffmurphy
From: jeff m. <jef...@us...> - 2005-08-22 19:26:18
|
Update of /cvsroot/netpass/NetPass/lib/NetPass In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3124/lib/NetPass Modified Files: Config.pm DB.pm Log Message: appstarter changes Index: Config.pm =================================================================== RCS file: /cvsroot/netpass/NetPass/lib/NetPass/Config.pm,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- Config.pm 16 Aug 2005 15:50:09 -0000 1.52 +++ Config.pm 22 Aug 2005 19:26:07 -0000 1.53 @@ -424,7 +424,8 @@ =head2 $bool = $cfg-E<gt>ha_servers(network) -If HA is enabled, returns the list of netpass servers assigned to this network. Else undef. +If HA is enabled, returns the list (ARRAYREF) of netpass servers assigned to this network. +Else undef. =cut Index: DB.pm =================================================================== RCS file: /cvsroot/netpass/NetPass/lib/NetPass/DB.pm,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- DB.pm 16 Aug 2005 15:50:09 -0000 1.53 +++ DB.pm 22 Aug 2005 19:26:07 -0000 1.54 @@ -1700,8 +1700,11 @@ Request a particular action be preformed on the specified process. If you specify serverid (a FQ hostname) it will only run on that -particular server. If you leave it empty (undef) it will run -on all servers. +particular server. If you leave it empty (undef) we'll used the +hostname of the host we are running on as the value. If you want +to run the same command on multiple servers (e.g. if you are running +in HA mode) then you need to insert a separate row for each +server. Returns 0 on failure, 1 on success. @@ -1719,7 +1722,7 @@ my $actionas = shift; my $serverid = shift; - $serverid ||= hostname; + $serverid ||= hostname; if (!defined($proc) || ($proc eq "")) { _log "ERROR", "no process name given\n"; @@ -1740,7 +1743,6 @@ action, actionas, status, serverid) VALUES(FROM_UNIXTIME(?), ?, ?, ?, ?, ?)}; - _log "DEBUG", "sql=$sql\n"; my $sth = $self->{'dbh'}->prepare($sql); if (!$sth->execute()) { @@ -1754,7 +1756,6 @@ } $sth->finish; - _log "DEBUG", "sql=$ins\n"; $sth = $self->{'dbh'}->prepare($ins); if (!$sth->execute(time(), $proc, $action, $actionas, 'pending', $serverid)) { |