summaryrefslogtreecommitdiffstats
path: root/perl-install/services.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-05 13:57:44 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-05 13:57:44 +0000
commitd58ca93dc979f583bd9fbcd2f0b360036d275274 (patch)
treea99c82d836abe3b4201ddab731cd434b63efdcd8 /perl-install/services.pm
parentb8687904824bcc18f07e1140125f5218d04b08e0 (diff)
downloaddrakx-d58ca93dc979f583bd9fbcd2f0b360036d275274.tar
drakx-d58ca93dc979f583bd9fbcd2f0b360036d275274.tar.gz
drakx-d58ca93dc979f583bd9fbcd2f0b360036d275274.tar.bz2
drakx-d58ca93dc979f583bd9fbcd2f0b360036d275274.tar.xz
drakx-d58ca93dc979f583bd9fbcd2f0b360036d275274.zip
fix the use of a non-bounded regexp to check services (fix "nfs" being marked
on whereas it is "nfslock" which is on)
Diffstat (limited to 'perl-install/services.pm')
-rw-r--r--perl-install/services.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/services.pm b/perl-install/services.pm
index 44baca620..02400a082 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -223,10 +223,10 @@ sub ask_standalone_gtk {
gtkpack__(new Gtk::HBox(0,0), gtkset_active(gtksignal_connect(
new Gtk::CheckButton(_("On boot")),
clicked => sub { if ($_[0]->active) {
- "@$on_services" =~ /$service/ or push(@$on_services,$service)
+ push @$on_services, $service if !member($service, @$on_services);
} else {
- @$on_services = grep(!/$service/, @$on_services)
- }}), "@$on_services" =~ /$service/)),
+ @$on_services = grep { $_ ne $service } @$on_services;
+ }}), member($service, @$on_services))),
map { my $a = $_;
gtkpack__(new Gtk::HBox(0,0), gtksignal_connect(new Gtk::Button(_($a)),
clicked => sub { my $c = "service $service " . (lc($a) eq "start" ? "restart" : lc($a)) . " 2>&1"; local $_ = `$c`; s/\033\[[^mG]*[mG]//g;
@@ -241,8 +241,8 @@ sub ask_standalone_gtk {
))
);
$b->signal_connect(motion_notify_event => sub { my ($w, $e) = @_;
- my ($ox, $oy) = $w->window->get_deskrelative_origin;
- $x = $e->{'x'}+$ox; $y = $e->{'y'}+$oy });
+ my ($ox, $oy) = $w->window->get_deskrelative_origin;
+ $x = $e->{'x'}+$ox; $y = $e->{'y'}+$oy });
$b->signal_connect(button_press_event => sub { $nopop->() });
$::isEmbedded and Gtk->main_iteration while Gtk->events_pending;
$::isEmbedded and kill (12, $::CCPID);