diff options
author | Derek Jennings <djennings@mageia.org> | 2013-09-10 15:58:44 +0100 |
---|---|---|
committer | Derek Jennings <djennings@mageia.org> | 2013-09-10 15:58:44 +0100 |
commit | 7dda0f76c3c052250507155511c31cb56aefad55 (patch) | |
tree | c4069e1cdfb35dac59c02e438ccbcceb21487bc3 | |
parent | a8743140268d441b157a42cf06d26ca610278794 (diff) | |
download | drakwizard-7dda0f76c3c052250507155511c31cb56aefad55.tar drakwizard-7dda0f76c3c052250507155511c31cb56aefad55.tar.gz drakwizard-7dda0f76c3c052250507155511c31cb56aefad55.tar.bz2 drakwizard-7dda0f76c3c052250507155511c31cb56aefad55.tar.xz drakwizard-7dda0f76c3c052250507155511c31cb56aefad55.zip |
ensure sshd config is read after package installed (mga#11134)
-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", }; |