basename error running ndspath on SLES 10

  • 3770577
  • 09-Jan-2007
  • 26-Apr-2012

Environment


Novell eDirectory 8.8 for Linux
Novell SUSE Linux Enterprise Server 10

Situation

Running ndspath to add environment variables for eDirectory 8.8 to the environment returns:

basename: invalid option -- b
Try `basename --help' for more information.

when run on SLES 10.


EXAMPLE:

/opt/novell/eDirectory/bin#. ./ndspath

basename: invalid option -- b
Try `basename --help' for more information.

This is due to the way "basename" is handling the input from $0 from the ndspath script.

(entry in ndspath script)
basescript=`basename $0`

"echo $0" returns -bash

If the variable is enclosed in [], then it isn't interpreted as an option being passed to basename.

Resolution

This problem has been reported to development.

Workaround 1:
Edit the ndspath script. (Default location is /opt/novell/eDirectory/bin. Custom location is customdirectory/opt/novell/eDirectory/bin
Modify:
basescript=`basename $0`
to be:
basescript=`basename [$0]`

Workaround 2:
Add the environment variables to a startup file like /etc/profile.local.

EXAMPLE: (default location)
PATH=/opt/novell/eDirectory/bin:/opt/novell/eDirectory/sbin:$PATH
LD_LIBRARY_PATH=/opt/novell/eDirectory/lib:/opt/novell/eDirectory/lib/nds-modules:/opt/novell/lib:$LD_LIBRARY_PATH
MANPATH=/opt/novell/man:/opt/novell/eDirectory/man:$MANPATH
TEXTDOMAINDIR=/opt/novell/eDirectory/share/locale
export PATH LD_LIBRARY_PATH MANPATH TEXTDOMAINDIR

EXAMPLE: (custom location)
PATH=customdirectory/opt/novell/eDirectory/bin:/opt/novell/eDirectory/sbin:$PATH
LD_LIBRARY_PATH=customdirectory/opt/novell/eDirectory/lib:/opt/novell/eDirectory/lib/nds-modules:/opt/novell/lib:$LD_LIBRARY_PATH
MANPATH=customdirectory/opt/novell/man:/opt/novell/eDirectory/man:$MANPATH
TEXTDOMAINDIR=customdirectory/opt/novell/eDirectory/share/locale
export PATH LD_LIBRARY_PATH MANPATH TEXTDOMAINDIR

Status

Reported to Engineering

Feedback service temporarily unavailable. For content questions or problems, please contact Support.