Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
smradius
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shail
smradius
Commits
8953047e
Commit
8953047e
authored
15 years ago
by
Nigel Kukard
Browse files
Options
Downloads
Patches
Plain Diff
* Cosmetic fixes
parent
cc94dd51
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
smadmin
+13
-14
13 additions, 14 deletions
smadmin
with
13 additions
and
14 deletions
smadmin
+
13
−
14
View file @
8953047e
#!/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
)
=
@_
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment