summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-28 21:47:05 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-28 21:47:05 +0000
commitfe868f817b6be1dd8c0e8774b8a575dbcfbdc522 (patch)
treeec05323101ec53df0dd2463ed278870e6803bccc /perl-install/any.pm
parentb239ce98bdf925490743befd8008f89097c13235 (diff)
downloaddrakx-fe868f817b6be1dd8c0e8774b8a575dbcfbdc522.tar
drakx-fe868f817b6be1dd8c0e8774b8a575dbcfbdc522.tar.gz
drakx-fe868f817b6be1dd8c0e8774b8a575dbcfbdc522.tar.bz2
drakx-fe868f817b6be1dd8c0e8774b8a575dbcfbdc522.tar.xz
drakx-fe868f817b6be1dd8c0e8774b8a575dbcfbdc522.zip
(running_window_manager): return the pids found if wanted
(ddcxinfos): ensure no probe is done when $::noauto
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 47de00273..fe9c4605c 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -1027,6 +1027,8 @@ You can use userdrake to add a user in this group.")
}
sub ddcxinfos {
+ return if $::noauto;
+
my @l = `$ENV{LD_LOADER} ddcxinfos`;
if ($::isInstall && -e "/tmp/ddcxinfos") {
my @l_old = cat_("/tmp/ddcxinfos");
@@ -1106,9 +1108,10 @@ sub running_window_manager {
my @window_managers = qw(kwin gnome-session icewm wmaker afterstep fvwm fvwm2 fvwm95 mwm twm enlightenment xfce blackbox sawfish olvwm);
foreach (@window_managers) {
- return $_ if fuzzy_pidofs(qr/\b$_\b/);
+ my @pids = fuzzy_pidofs(qr/\b$_\b/) or next;
+ return wantarray ? ($_, @pids) : $_;
}
- '';
+ undef;
}
sub ask_window_manager_to_logout {