Bug 1452 - grep in netscape 4.08-1 startup script can dump core
Summary: grep in netscape 4.08-1 startup script can dump core
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: netscape
Version: 5.2
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-03-08 15:54 UTC by wgm2
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 1999-03-08 19:21:30 UTC
Embargoed:


Attachments (Terms of Use)

Description wgm2 1999-03-08 15:54:15 UTC
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 19:21:59 UTC
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.