diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2005-09-19 12:54:28 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2005-09-19 12:54:28 +0000 |
commit | 109b04314659c0211519a7e140a33d7e662a14cc (patch) | |
tree | a44c66a89836c62c0a62190ef54b52681872c148 | |
parent | 94ba2b11dd295ad43a2da532a3c121892f8d7d2b (diff) | |
download | control-center-109b04314659c0211519a7e140a33d7e662a14cc.tar control-center-109b04314659c0211519a7e140a33d7e662a14cc.tar.gz control-center-109b04314659c0211519a7e140a33d7e662a14cc.tar.bz2 control-center-109b04314659c0211519a7e140a33d7e662a14cc.tar.xz control-center-109b04314659c0211519a7e140a33d7e662a14cc.zip |
show drakauth (again) in "system" section only if drakwizard isn't installed (#18687)
-rwxr-xr-x | control-center | 12 |
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", |