From afbf5f47aae5693804f9a4da8c26f1dfc266e5d1 Mon Sep 17 00:00:00 2001 From: Anders Nordby Date: Tue, 23 Nov 2004 07:29:45 +0000 Subject: Add NAV (Network Administration Visualized), a network administration package from NTNU - Norwegian University of Science and Technology. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This port is work-in-progress, currently. Sponsored by: University of Tromsø --- .../files/patch-subsystem-startstop-functions.in | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 net-mgmt/nav/files/patch-subsystem-startstop-functions.in (limited to 'net-mgmt/nav/files/patch-subsystem-startstop-functions.in') diff --git a/net-mgmt/nav/files/patch-subsystem-startstop-functions.in b/net-mgmt/nav/files/patch-subsystem-startstop-functions.in new file mode 100644 index 000000000000..b39a2cfb29a0 --- /dev/null +++ b/net-mgmt/nav/files/patch-subsystem-startstop-functions.in @@ -0,0 +1,22 @@ +--- subsystem/startstop/functions.in.orig Thu Nov 18 13:10:22 2004 ++++ subsystem/startstop/functions.in Thu Nov 18 13:10:26 2004 +@@ -84,6 +84,10 @@ + return 1 + } + ++pidexists() { ++ ps -p $1 | tail +2 ++} ++ + pidofproc() { + local base=${1##*/} + local PIDOF=/sbin/pidof +@@ -99,7 +103,7 @@ + local line p pid= + read line < $pidfile + for p in $line ; do +- [ -z "${p//[0-9]/}" -a -d /proc/$p ] && pid="$pid $p" ++ [ -z "${p//[0-9]/}" -a -n "`pidexists $p`" ] && pid="$pid $p" + done + if [ -n "${pid-:}" ] ; then + echo $pid -- cgit v1.2.3