summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-08-09 00:52:04 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-08-09 00:52:04 +0000
commit7468c795a6cb24ecf527d8223bd5b33ea889fe9a (patch)
tree436fc510786bd920e614a539d741453e12af906d
parent8a44a1a180393515046bf33d4dcd3ee519a654fe (diff)
downloaddrakx-7468c795a6cb24ecf527d8223bd5b33ea889fe9a.tar
drakx-7468c795a6cb24ecf527d8223bd5b33ea889fe9a.tar.gz
drakx-7468c795a6cb24ecf527d8223bd5b33ea889fe9a.tar.bz2
drakx-7468c795a6cb24ecf527d8223bd5b33ea889fe9a.tar.xz
drakx-7468c795a6cb24ecf527d8223bd5b33ea889fe9a.zip
allow multiple instances, but only one per user (Joe Bolin <sopwithcamel@charter.net>)
-rw-r--r--perl-install/standalone/net_applet9
1 files changed, 3 insertions, 6 deletions
diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet
index 4ffbd4ab4..a49c75941 100644
--- a/perl-install/standalone/net_applet
+++ b/perl-install/standalone/net_applet
@@ -15,12 +15,9 @@ my ($menu, $timeout);
my $raisedwindow = 0;
my $onstartupfile = "$ENV{HOME}/.net_applet";
add_icon_path("/usr/share/libDrakX/pixmaps/");
-#don't launch it twice :)
-#my @pids = fuzzy_pidofs(qr/\bnet_applet\b/);
-#foreach (@pids) {
-# print "pid = $_ \n";
-#}
-#@pids > 1 and die "net_applet already running\n";
+# Allow multiple instances, but only one per user:
+my @pids = `ps -u $ENV{USER} | grep net_applet`;
+@pids > 1 and die "net_applet already running\n";
my $prog_name = "/usr/bin/net_applet";
my $current_md5 = md5file($prog_name);