Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1575003
 поиск   регистрация   авторизация 
 
Группа :: Сети/WWW
Пакет: firefox

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: firefox-1.0-alt-binary-paths-fix.patch


--- mozilla/browser/app/mozilla.in.fix	2005-01-08 05:31:14 +0300
+++ mozilla/browser/app/mozilla.in	2005-01-08 05:32:15 +0300
@@ -79,61 +79,29 @@ export MOZ_PLUGIN_PATH="%PLUGIN_PATH%:$m
 [ -z "$HOME" ] || export MOZ_PLUGIN_PATH="$MOZ_PLUGIN_PATH:$HOME/%MOZ_USER_DIR%/plugins"
 
 # Use run-mozilla.sh in the current dir if it exists
 # If not, then start resolving symlinks until we find run-mozilla.sh
 found=0
 progname="$0"
 curdir=`dirname "$progname"`
 progbase=`basename "$progname"`
-run_moz="$curdir/run-mozilla.sh"
-if test -x "$run_moz"; then
-  dist_bin="$curdir"
-  found=1
-else
-  here=`/bin/pwd`
-  while [ -h "$progname" ]; do
-    bn=`basename "$progname"`
-    cd `dirname "$progname"`
-    progname=`/bin/ls -l "$bn" | sed -e 's/^.* -> //' `
-    if [ ! -x "$progname" ]; then
-      break
-    fi
-    curdir=`dirname "$progname"`
-    run_moz="$curdir/run-mozilla.sh"
-    if [ -x "$run_moz" ]; then
-      cd "$curdir"
-      dist_bin=`pwd`
-      run_moz="$dist_bin/run-mozilla.sh"
-      found=1
-      break
-    fi
-  done
-  cd "$here"
-fi
-if [ $found = 0 ]; then
-  # Check default compile-time libdir
-  if [ -x "$moz_libdir/run-mozilla.sh" ]; then
-    dist_bin="$moz_libdir"
-  else 
-    echo "Cannot find mozilla runtime directory. Exiting."
-    exit 1
-  fi
-fi
+run_moz="$moz_libdir/run-mozilla.sh"
+dist_bin="$moz_libdir"
 
 script_args=""
 moreargs=""
 debugging=0
 MOZILLA_BIN="${progbase}-bin"
 
 # The following is to check for a currently running instance.
 # This is taken almost verbatim from the Mozilla RPM package's launch script.
 MOZ_CLIENT_PROGRAM="$dist_bin/mozilla-xremote-client"
 check_running() {
-    "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" 'ping()' 2>/dev/null >/dev/null
+    "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" -u "$USER" 'ping()' 2>/dev/null >/dev/null
     RETURN_VAL=$?
     if [ $RETURN_VAL -eq 0 ]; then
         echo 1
         return 1
     else
         echo 0
         return 0
     fi
@@ -175,24 +143,24 @@ fi
 if [ $ALREADY_RUNNING -eq 1 ]; then
 	# There's an instance already running. Use it.
 	# Any command line args passed in?
 	if [ $# -gt 0 ]; then
 		# There were "some" command line args.
 		if [ ${_USE_EXIST} -eq 1 ]; then
 			# We should use an existing instance, as _USE_EXIST=$_USE_EXIST=-1
 			_remote_cmd="openURL(${_optLast})"
-			"${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "${_remote_cmd}"
+			"${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" -u "$USER" "${_remote_cmd}"
 			unset _remote_cmd
 			exit $?
 		fi
 	else
 		# No command line args. Open new window/tab
 		#exec "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "xfeDoCommand(openBrowser)"
-		"${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "xfeDoCommand(openBrowser)"
+		"${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" -u "$USER" "xfeDoCommand(openBrowser)"
 		exit $?
 	fi
 fi
 # Default action - no running instance or _USE_EXIST (${_USE_EXIST}) ! -eq 1
 ########################################################################### Main
 
 while [ $# -gt 0 ]
 do
 
design & coding: Vladimir Lettiev aka crux © 2004-2005