summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-11-23 20:43:56 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-11-23 20:43:56 +0100
commit62bda69f02ed65a1d3d1561178d799f38a5a3d5a (patch)
treeab2238ce2621df192ba96302e6d077293f19481c /perl-install
parentc7311496756920a24ea3b88cbc0fb3168bb46131 (diff)
downloaddrakx-62bda69f02ed65a1d3d1561178d799f38a5a3d5a.tar
drakx-62bda69f02ed65a1d3d1561178d799f38a5a3d5a.tar.gz
drakx-62bda69f02ed65a1d3d1561178d799f38a5a3d5a.tar.bz2
drakx-62bda69f02ed65a1d3d1561178d799f38a5a3d5a.tar.xz
drakx-62bda69f02ed65a1d3d1561178d799f38a5a3d5a.zip
recognize e17/lxde/mate/razor (mga#12495, Luc Menut)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS3
-rw-r--r--perl-install/pkgs.pm5
2 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index ef911634d..c463d467e 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,6 @@
+- harddrake:
+ o recognize e17/lxde/mate/razor (mga#12495, Luc Menut)
+
Version 16.44 - 23 October 2014
- fix drakxservices not showing all services due to systemctl output change
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index afc5cc784..e1e1b3725 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -221,6 +221,11 @@ sub detect_hardware_packages {
my @ignore_flags = $::isInstall ? () : (
if_(!$do_pkgs->is_installed('task-kde4-minimal'), "CAT_KDE"),
if_(!$do_pkgs->is_installed('task-gnome-minimal'), "CAT_GNOME"),
+ if_(!$do_pkgs->is_installed('task-cinnamon-minimal'), "CAT_CINNAMON"),
+ if_(!$do_pkgs->is_installed('task-mate-minimal'), "CAT_MATE"),
+ if_(!$do_pkgs->is_installed('task-xfce-minimal'), "CAT_XFCE"),
+ if_(!$do_pkgs->is_installed('task-e17-minimal'), "CAT_E17"),
+ if_(!$do_pkgs->is_installed('task-razorqt'), "CAT_RAZOR"),
);
(
($::isInstall ? () : detect_rpmsrate_hardware_packages($o_match_all_hardware, \@ignore_flags)),
($opt, $val) = split(/$separator/, $_, 2); chop $val; if_($opt ne 'set_security_conf', $opt => $val); } cat_($msec->{$category}{defaults_file}), if_($category eq "checks", 'MAIL_USER'); } # get_XXX_default(function) - # return the default of the function|check passed in argument. sub get_check_default { my ($msec, $check) = @_; $msec->{checks}{default}{$check}; } sub get_function_default { my ($msec, $function) = @_; $msec->{functions}{default}{$function}; } #------------------------------------------------------------- # option values sub load_values { my ($msec, $category) = @_; my $separator = $msec->{$category}{val_separator}; map { my ($opt, $val) = split /$separator/; chop $val; $val =~ s/[()]//g; chop $opt if $separator eq '\('; # $opt =~ s/ //g if $separator eq '\('; if_(defined($val), $opt => $val); } cat_($msec->{$category}{values_file}); } # get_XXX_value(check|function) - # return the value of the function|check passed in argument. # If no value is set, return "default". sub get_function_value { my ($msec, $function) = @_; exists $msec->{functions}{value}{$function} ? $msec->{functions}{value}{$function} : "default"; } sub get_check_value { my ($msec, $check) = @_; $msec->{checks}{value}{$check} || "default"; } #------------------------------------------------------------- # get list of check|functions # list_(functions|checks) - # return a list of functions|checks handled by level.local|security.conf sub raw_checks_list { my ($msec) = @_; keys %{$msec->{checks}{default}}; } sub list_checks { my ($msec) = @_; difference2([ $msec->raw_checks_list ], [ qw(MAIL_WARN MAIL_USER) ]); } sub list_functions { my ($msec, $category) = @_; ## TODO handle 3 last functions here so they can be removed from this list my @ignore_list = qw(indirect commit_changes closelog error initlog log set_secure_level set_security_conf set_server_level print_changes get_translation create_server_link); my %options = ( 'network' => [qw(accept_bogus_error_responses accept_broadcasted_icmp_echo accept_icmp_echo enable_dns_spoofing_protection enable_ip_spoofing_protection enable_log_strange_packets enable_promisc_check no_password_aging_for)], 'system' => [qw(allow_autologin allow_issues allow_reboot allow_remote_root_login allow_root_login allow_user_list allow_xauth_from_root allow_x_connections allow_xserver_to_listen authorize_services enable_at_crontab enable_console_log enable_msec_cron enable_pam_wheel_for_su enable_password enable_security_check enable_sulogin password_aging password_history password_length set_root_umask set_shell_history_size set_shell_timeout set_user_umask)]); # get all function names; filter out those which are in the ignore # list, return what lefts. grep { !member($_, @ignore_list) && member($_, @{$options{$category}}) } keys %{$msec->{functions}{default}}; } #------------------------------------------------------------- # set back checks|functions values sub set_function { my ($msec, $function, $value) = @_; $msec->{functions}{value}{$function} = $value; } sub set_check { my ($msec, $check, $value) = @_; $msec->{checks}{value}{$check} = $value; } #------------------------------------------------------------- # apply configuration # config_(check|function)(check|function, value) - # Apply the configuration to 'prefix'/etc/security/msec/security.conf||/etc/security/msec/level.local sub apply_functions { my ($msec) = @_; my @list = sort($msec->list_functions('system'), $msec->list_functions('network')); touch($msec->{functions}{values_file}) if !-e $msec->{functions}{values_file}; substInFile { foreach my $function (@list) { s/^$function.*\n// } if (eof) { $_ .= join("\n", if_(!$_, ''), (map { my $value = $msec->get_function_value($_); if_($value ne 'default', "$_ ($value)"); } @list), ""); } } $msec->{functions}{values_file}; } sub apply_checks { my ($msec) = @_;