$NetBSD: patch-bk,v 1.2 2005/05/29 14:38:33 wiz Exp $

--- progs/tools/run_glunix_agent.pl.orig	1997-10-02 20:42:13.000000000 +0200
+++ progs/tools/run_glunix_agent.pl
@@ -60,7 +60,7 @@ sub get_pid {
 sub do_ps {
     local($pid, $path) = @_;
 
-    open(FD,"/bin/ps -edaf -p $pid | grep $path | grep -v grep|");
+    open(FD,"/bin/ps -ax -p $pid | grep $path | grep -v grep|");
     while (<FD>) {
 	m/^\s*[a-zA-Z0-9\-]+\s+([0-9]+)/;
 	if ($pid == $1) {
@@ -188,7 +188,7 @@ if ($command eq "dquery") {
 } elsif ($command eq "dnuke") {
     $killed_some = 0;
     while (1) {
-	$str = `/bin/ps -edaf | grep daemon | grep now/glunix/ | grep -v grep`;
+	$str = `/bin/ps -ax | grep '(daemon)' | grep -v grep`;
 	$str =~ s/^\s*//;
 	@pid = split(/\s+/, $str);
 	if ($#pid > 2) {
@@ -209,7 +209,7 @@ if ($command eq "dquery") {
 } elsif ($command eq "mnuke") {
     $killed_some = 0;
     while (1) {
-	$str = `/bin/ps -edaf | grep master | grep now/glunix/ | grep -v grep`;
+	$str = `/bin/ps -ax | grep '(master)' | grep -v grep`;
 	$str =~ s/^\s*//;
 	@pid = split(/\s+/, $str);
 	if ($#pid > 2) {
