From: Michael Gernoth Date: Thu, 5 Feb 2009 07:18:24 +0000 (+0100) Subject: retrieve userlist, so user properties can bes saved and restored, too X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/rsbs2/commitdiff_plain/d5e3ce21367fc09cdcff59993d66ea9607e2d333 retrieve userlist, so user properties can bes saved and restored, too --- diff --git a/rsbs2.pl b/rsbs2.pl index a481f45..3b752c2 100755 --- a/rsbs2.pl +++ b/rsbs2.pl @@ -279,6 +279,22 @@ sub show_all_vars { } } +sub usrlist { + my $reqstr = ''; + my $res = _req($reqstr); + my @users = (); + + if ($res->{RESP}->{RC} ne '0x0') { + print "FAILED:".$res->{RESP}->{RC}."\n"; + (); + } else { + foreach my $usr (@{$res->{RESP}->{USRLIST}->{USER}}) { + push @users, $usr->{NAME}; + } + } + @users; +} + sub syslog_debug { my $destination_ip = shift; my $bcast = shift; @@ -506,6 +522,9 @@ if ($save ne '') { print SAVEFILE "${ts}=".$phash->{VAL}."\n"; print STDERR "." if (!$verbose); } + foreach my $usr (usrlist()) { + print STDERR "TODO: save user ${usr}\n"; + } close(SAVEFILE); print STDERR "done\n" if (!$verbose); }