Bug 1452

Summary: grep in netscape 4.08-1 startup script can dump core
Product: [Retired] Red Hat Linux Reporter: wgm2
Component: netscapeAssignee: David Lawrence <dkl>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-03-08 19:21:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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.