diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-02 16:12:36 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-02 16:12:36 -0700 |
commit | 1bf6ab3a126ec6c0dd28545e35b5c4def7b58cd5 (patch) | |
tree | aec90cda4ac2fa5388cac36d0a3f091e1b756bfc /scripts | |
parent | cd519640744ce0edb40f3d70f4456f3818eb7e36 (diff) | |
parent | 8d3f5b37ec3c728d56fadc596562025821169329 (diff) | |
download | vyatta-cfg-system-1bf6ab3a126ec6c0dd28545e35b5c4def7b58cd5.tar.gz vyatta-cfg-system-1bf6ab3a126ec6c0dd28545e35b5c4def7b58cd5.zip |
Merge branch 'jenner' of 192.168.100.1:git/vyatta-cfg-system into jenner
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/system/vyatta_update_login.pl | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/scripts/system/vyatta_update_login.pl b/scripts/system/vyatta_update_login.pl index b2125de1..862dffe3 100644 --- a/scripts/system/vyatta_update_login.pl +++ b/scripts/system/vyatta_update_login.pl @@ -26,15 +26,16 @@ use Vyatta::Config; my $config = new Vyatta::Config; $config->setLevel("system login"); -foreach my $type ($config->listNodes()) { +my %loginNodes = $config->listNodeStatus(); +while ( my ($type, $status) = each %loginNodes) { + next if ($status eq 'static'); my $kind = ucfirst $type; - my $location = "Vyatta/Login/$kind.pm"; - my $class = "Vyatta::Login::$kind"; - - require $location; + $kind =~ s/-server/Server/; - my $obj = $class->new(); - die "Don't understand $type" unless $obj; + # Dynamically load the module to handle that login method + require "Vyatta/Login/$kind.pm"; - $obj->update(); + # Dynamically invoke update for this type + my $login = "Vyatta::Login::$kind"; + $login->update(); } |