summaryrefslogtreecommitdiffstats
path: root/control-center
diff options
context:
space:
mode:
Diffstat (limited to 'control-center')
-rwxr-xr-xcontrol-center12
1 files changed, 9 insertions, 3 deletions
diff --git a/control-center b/control-center
index 52d8f25f..ba0c2d78 100755
--- a/control-center
+++ b/control-center
@@ -727,6 +727,12 @@ my %programs =
);
+
+sub is_wizard_installed { -f top(glob("/usr/lib/perl5/vendor_perl/*/MDK/Wizard/$_[0]")) }
+
+my $is_auth_wizard_installed = is_wizard_installed('Nisautofs.pm');
+
+
sub wizard_format {
map {
my ($id, $wizard, $icon, $description, $long_description, $file, $expert_mode) = @$_;
@@ -739,7 +745,7 @@ sub wizard_format {
icon => $icon,
expert_mode => $expert_mode,
};
- -f top(glob("/usr/lib/perl5/vendor_perl/*/MDK/Wizard/$file")) ? $id : ();
+ is_wizard_installed($file) ? $id : ();
} @_;
}
@@ -811,7 +817,7 @@ my @tree =
],
[ N("Authentication"), 'drakauth-mdk',
[
- "Authentication",
+ if_($is_auth_wizard_installed, "Authentication"),
(wizard_format(# [ id, wizard file name, icon, description ]
[ 'Nis+autofs wizard', "nisautofs", 'nisautofs', N("Configure NIS and Autofs"),
N("Configure the NIS and Autofs services"), 'Nisautofs.pm',
@@ -903,7 +909,7 @@ my @tree =
[ N("System"), 'system-mdk',
[
- "Authentication",
+ if_(!$is_auth_wizard_installed, "Authentication"),
"Menus",
"Display Manager chooser",
"Services",