Skip to content
Snippets Groups Projects
Commit 8953047e authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Cosmetic fixes

parent cc94dd51
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/perl #!/usr/bin/perl
# SMRadius administration tool # SMRadius administration tool
# Copyright (C) 2009, AllWorldIT # Copyright (C) 2009, AllWorldIT
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License along # You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc., # with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
...@@ -23,7 +23,7 @@ use warnings; ...@@ -23,7 +23,7 @@ use warnings;
# Set library directory # Set library directory
use lib qw( use lib qw(
../ ./ ../ ./
smradius/modules/authentication smradius/modules/authentication
smradius/modules/userdb smradius/modules/userdb
smradius/modules/accounting smradius/modules/accounting
...@@ -38,7 +38,7 @@ use Getopt::Long; ...@@ -38,7 +38,7 @@ use Getopt::Long;
use smradius::logging; use smradius::logging;
use smradius::version; use smradius::version;
print("SMRadius Admin Tool v".VERSION." - Copyright (c) 2008-2009 AllWorldIT\n"); print("SMRadius Admin Tool v".VERSION." - Copyright (c) 2008-2009 AllWorldIT\n");
# Fire up commandline processing... # Fire up commandline processing...
...@@ -116,7 +116,7 @@ if ($opts{'cleanup'}) { ...@@ -116,7 +116,7 @@ if ($opts{'cleanup'}) {
# #
# Misc functions # Misc functions
# #
# Register plugin info # Register plugin info
...@@ -210,24 +210,21 @@ sub loadModules ...@@ -210,24 +210,21 @@ sub loadModules
my $pluginlist = [ my $pluginlist = [
@{$auth->{'mechanisms'}}, @{$auth->{'mechanisms'}},
@{$auth->{'users'}}, @{$auth->{'users'}},
@{$acct->{'plugins'}}, @{$acct->{'plugins'}},
@{$features->{'plugins'}}, @{$features->{'plugins'}},
@{$system->{'plugins'}} @{$system->{'plugins'}}
]; ];
# use Data::Dumper; print STDERR Dumper($pluginlist);
# Emulate server # Emulate server
$server = new smserver; $server = new smserver;
$server->{'inifile'} = \%config; $server->{'inifile'} = \%config;
# Init everything # Init everything
$server->init(); $server->init();
# Load plugins # Load plugins
foreach my $plugin (@{$pluginlist}) { foreach my $plugin (@{$pluginlist}) {
# Load plugin # Load plugin
...@@ -279,11 +276,12 @@ sub new ...@@ -279,11 +276,12 @@ sub new
my $self = { my $self = {
}; };
bless $self, $class; bless $self, $class;
return $self; return $self;
}; };
sub init sub init
{ {
my $self = shift; my $self = shift;
...@@ -305,6 +303,7 @@ sub init ...@@ -305,6 +303,7 @@ sub init
smradius::dblayer::setHandle($self->{'client'}->{'dbh'}); smradius::dblayer::setHandle($self->{'client'}->{'dbh'});
} }
sub log sub log
{ {
my ($self,$level,@msg) = @_; my ($self,$level,@msg) = @_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment