diff options
-rw-r--r-- | NEWS | 1 | ||||
-rwxr-xr-x | sshd_wizard/Sshd.pm | 27 |
2 files changed, 14 insertions, 14 deletions
@@ -1,3 +1,4 @@ +- ensure sshd config is read after package installed (mga#11134) - fix detection of invalid domain names Version 3.11 - 30 Aug 2013, by Derek Jennings 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", }; |