diff options
Diffstat (limited to 'sshd_wizard')
-rwxr-xr-x | sshd_wizard/Sshd.pm | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/sshd_wizard/Sshd.pm b/sshd_wizard/Sshd.pm index e86a4028..2eab1959 100755 --- a/sshd_wizard/Sshd.pm +++ b/sshd_wizard/Sshd.pm @@ -33,26 +33,25 @@ my $wiz = new MDK::Wizard::Wizcommon; my $in = interactive->vnew; my $conf = "/etc/ssh/sshd_config"; #my $SHORTHOSTNAME = chomp_(`hostname -s`); - -# we ask glueconf to give us the structure representing /etc/ssh/sshd_config -my $sshd = new Libconf::Glueconf::Networking::Sshd_config({ filename => '/etc/ssh/sshd_config' }); - -# ------ debug -use Data::Dumper; -print Dumper($sshd); +my $sshd; my $o = { name => 'SSH wizard', var => { wiz_port => '', }, -# init => sub { -# my ($err, $msg) = test_host_domain($SHORTHOSTNAME, $DOMAINNAME); -# if (!$err) { -# $in->ask_warn(N('Error'), $msg); -# die 'wizcancel'; -# } -# }, + init => sub { + if (-f $conf) { + # we ask glueconf to give us the structure representing /etc/ssh/sshd_config + $sshd = new Libconf::Glueconf::Networking::Sshd_config({ filename => '/etc/ssh/sshd_config' }); + # ------ debug + use Data::Dumper; + print Dumper($sshd); + } else { + return 0, N("%s does not exist.", $conf); + } + 1; + }, needed_rpm => [ 'openssh-server' ], defaultimage => "/usr/share/wizards/sshd_wizard/images/IC-Dssh-48.png", }; |