|
From: Matthew C. <ma...@ma...> - 2008-05-02 23:27:42
|
I just wanted to share my little issue with a Solaris 10 install that has
had many of the "expected" packages removed. And how I modified the wrapper
shell script to work on the "limited" install server. Of note, all xpg4, UC
Berkley (ucb), sfw, etc. packages have been removed ( the admins followed
some Sun document that lists "safe" packages to remove ). Leaving pretty
much a "bare bones" install.
The problem I ran in to was created by the fix of bug #1024008 for Solaris.
In that, none of the xpg4 binaries are available on this server. Either
way, with or without the fix of the bug this problem would have existed. I'm
none too sure if this would be considered a "good" fix - but, it does work
reliably and does not affect any of the other operating
systems/architectures that use the wrapper shell script. It also wont use
this hack if the /usr/xpg4/bin/id is available on the Solaris system.
Anyway, here is a diff between an original wrapper and the modified wrapper:
$ diff wrapper wrapper.orig
334,344d333
< if [ "$DIST_OS" = "solaris" ]
< then
< CUTEXE="/usr/bin/cut"
< if [ ! -x "$CUTEXE" ]
< then
< echo "Unable to locate a usable 'id' command."
< echo "Please report this message along with the
location of the command on your system."
< exit 1
< fi
< RUNUSER=`${IDEXE} | ${CUTEXE} -d '(' -f2 | ${CUTEXE} -d ')'
-f1`
< fi
347,352c336
< if [ "X$RUNUSER" = "X" ]
< then
< RUNUSER=`${IDEXE} -u -n`
< fi
<
< if [ "${RUNUSER}" = "$RUN_AS_USER" ]
---
> if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ]
357d340
<
My hope is to pass this along to another user should they run in to this
frustrating situation. Sorry for the noise if this has been covered
before... I did search around for a solution before I posted this. I can
provide the full, modified, wrapper shall script should anyone find interest
in it.
Matt
|