#!/bin/sh

##
## Disable the gnome crash dialog.  Once bug buddy supports 
## Bugzilla, we will turn take this hack out.
##
GNOME_DISABLE_CRASH_DIALOG=1 ; export GNOME_DISABLE_CRASH_DIALOG

##
## Set up Mozilla environment variables for people using Debian.
##
if [ -z "$MOZILLA_FIVE_HOME" -a -f /etc/debian_version ]
then
  MOZILLA_FIVE_HOME=/usr/lib/mozilla ; export MOZILLA_FIVE_HOME
  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MOZILLA_FIVE_HOME ; export LD_LIBRARY_PATH
fi

##
## Find out if Nautilus is already running
##

if	case "`uname`" in
		*BSD*)
			ps -o command | awk '{print $1}'
		;;

		*)
			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

exec nautilus ${1+"$@"}
