summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Fischer <eric@eazel.com>2001-03-09 00:08:05 +0000
committerEric Fischer <eric@src.gnome.org>2001-03-09 00:08:05 +0000
commitc7d526c3124e7a9f84e9935846249c2426e32021 (patch)
tree1c01358f41629cfc6d31d017b3cd657c1b0ed687
parentc8a9597393333861169712e8be59e5ac67f4761e (diff)
downloadnautilus-c7d526c3124e7a9f84e9935846249c2426e32021.tar.gz
reviewed by: Don Melton <don@eazel.com>
2001-03-08 Eric Fischer <eric@eazel.com> reviewed by: Don Melton <don@eazel.com> * src/run-nautilus: Change ps options to something that should work on any POSIX system, and add workaround for 4.4BSD systems' incompatible ps.
-rw-r--r--ChangeLog12
-rwxr-xr-xsrc/run-nautilus31
2 files changed, 30 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 80c2bdf9c..ac956d092 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2001-03-08 Eric Fischer <eric@eazel.com>
+
+ Merge from HEAD:
+
+ 2001-03-08 Eric Fischer <eric@eazel.com>
+
+ reviewed by: Don Melton <don@eazel.com>
+
+ * src/run-nautilus:
+ Change ps options to something that should work on any POSIX system,
+ and add workaround for 4.4BSD systems' incompatible ps.
+
2001-03-08 Robin * Slomkowski <rslomkow@eazel.com>
reviewed by: <eskil@eazel.com>
diff --git a/src/run-nautilus b/src/run-nautilus
index 7aad3937f..6a82d5b3f 100755
--- a/src/run-nautilus
+++ b/src/run-nautilus
@@ -18,20 +18,25 @@ fi
##
## Find out if Nautilus is already running
##
-ps ax|awk '{ print $5; }' | grep -w -e "nautilus$" > /dev/null 2>&1
-ps_rv=$?
+if case "`uname`" in
+ *BSD*)
+ ps -o command | awk '{print $1}'
+ ;;
-if [ $ps_rv -eq 1 ]
-then
- ## Do a sanity check on the nautilus RPM
- nautilus-verify-rpm.sh
- if [ $? -ne 0 ]
- then
- exit 1
- fi
+ *)
+ ps -o comm -U `whoami`
+ ;;
+ esac |
+ grep '^nautilus' > /dev/null
+then :
+else
+ if nautilus-verify-rpm.sh
+ then :
+ else
+ echo "$0: nautilus-verify-rpm.sh failed" >&2
+ exit 1
+ fi
fi
-nautilus ${1+"$@"}
-
-exit $?
+exec nautilus ${1+"$@"}