summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/system/vyatta_update_login.pl13
1 files changed, 5 insertions, 8 deletions
diff --git a/scripts/system/vyatta_update_login.pl b/scripts/system/vyatta_update_login.pl
index b854427b..94e88ed1 100644
--- a/scripts/system/vyatta_update_login.pl
+++ b/scripts/system/vyatta_update_login.pl
@@ -30,13 +30,10 @@ foreach my $type ($config->listNodes()) {
my $kind = ucfirst $type;
$kind =~ s/-server/Server/;
- my $location = "Vyatta/Login/$kind.pm";
- my $class = "Vyatta::Login::$kind";
-
- require $location;
+ # Dynamically load the module to handle that login method
+ require "Vyatta/Login/$kind.pm";
- my $obj = $class->new();
- die "Don't understand $type" unless $obj;
-
- $obj->update();
+ # Dynamically invoke update for this type
+ my $login = "Vyatta::Login::$kind";
+ $login->update();
}