summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xsshd_wizard/Sshd.pm27
2 files changed, 14 insertions, 14 deletions
diff --git a/NEWS b/NEWS
index 90019d4b..73b5d927 100644
--- a/NEWS
+++ b/NEWS
@@ -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",
};