summaryrefslogtreecommitdiff
path: root/firefox.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'firefox.sh.in')
-rw-r--r--firefox.sh.in27
1 files changed, 23 insertions, 4 deletions
diff --git a/firefox.sh.in b/firefox.sh.in
index 1af0b7e..22a7f26 100644
--- a/firefox.sh.in
+++ b/firefox.sh.in
@@ -36,10 +36,29 @@ cmdname=`basename $0`
##
## Variables
##
-MOZ_LIB_DIR="/usr/lib"
-if [ -x "/usr/lib64/firefox-FIREFOX_VERSION/firefox-bin" ]
-then
- MOZ_LIB_DIR="/usr/lib64"
+MOZ_ARCH=$(uname -m)
+case $MOZ_ARCH in
+ x86_64 | ia64 | s390 )
+ MOZ_LIB_DIR="/usr/lib64"
+ SECONDARY_LIB_DIR="/usr/lib"
+ ;;
+ * )
+ MOZ_LIB_DIR="/usr/lib"
+ SECONDARY_LIB_DIR="/usr/lib64"
+ ;;
+esac
+
+#[ -r /etc/sysconfig/firefox-arch ] && . /etc/sysconfig/firefox-arch
+
+if [ ! -x $MOZ_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin ]; then
+ if [ ! -x $SECONDARY_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin ]; then
+ echo "Error: $MOZ_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin not found"
+ if [ -d $SECONDARY_LIB_DIR ]; then
+ echo " $SECONDARY_LIB_DIR/firefox-FIREFOX_VERSION/firefox-bin not found"
+ fi
+ exit 1
+ fi
+ MOZ_LIB_DIR="$SECONDARY_LIB_DIR"
fi
MOZ_DIST_BIN="$MOZ_LIB_DIR/firefox-FIREFOX_VERSION"
MOZ_PROGRAM="$MOZ_DIST_BIN/firefox-bin"
bgstack15