Bug 1452 - grep in netscape 4.08-1 startup script can dump core
grep in netscape 4.08-1 startup script can dump core
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: netscape (Show other bugs)
5.2
i386 Linux
medium Severity low
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-03-08 10:54 EST by wgm2
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-03-08 14:21:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description wgm2 1999-03-08 10:54:15 EST
The libBrokenLocale stuff in /usr/bin/netscape
can cause grep to dump core
while looking for your startup page (I think).  Easy fix,
just do grep before setting up libBrokenLocale.  I've
included my version of the startup script below:

#!/bin/sh

which=""

if echo $0 | grep 'navigator' >/dev/null; then
    which=netscape-navigator
elif echo $0 | grep 'communicator' >/dev/null ; then
    which=netscape-communicator
fi

if [ -z $which ]; then
    if rpm -q netscape-communicator >/dev/null 2>&1; then
        which=netscape-communicator
    elif rpm -q netscape-navigator >/dev/null 2>&1; then
        which=netscape-navigator
    else
        echo "You don't have netscape installed." >&2
    fi
fi

if ! rpm -q $which >/dev/null 2>&1; then
    echo "You don't have $which installed." >&2
    exit 1
fi

I="`rpm -q $which --qf '%{INSTALLPREFIX}\n'`"
if [ "$I" = "(none)" ]; then
    I=/usr
fi


if [ -x $I/lib/netscape/$which ]; then

    if [ -z "$*" ]; then
        HOMEPAGE=/usr/doc/HTML/index.html
        if [ -f $HOME/.netscape/preferences.js ]; then
            if grep "browser.startup.homepage" \
                        $HOME/.netscape/preferences.js >
/dev/null; then
                HOMEPAGE=""
            fi
        fi
        arglist=$HOMEPAGE
    else
        arglist=$@
    fi

    locale_load=/lib/libBrokenLocale.so.1
    if [ ! -f $locale_load ] ; then
        locale_load=
    fi
    if [ -n "$locale_load" ] ; then
        LD_PRELOAD=$locale_load
        export LD_PRELOAD
    fi

    exec $I/lib/netscape/$which $arglist
fi

echo "An error occurred running and $I/lib/netscape/$which."
Comment 1 Bill Nottingham 1999-03-08 14:21:59 EST
later netscape packages don't load libBrokenLocale themselves,
so this has been fixed.

Note You need to log in before you can comment on or make changes to this bug.