pkgrm -- /usr/bin/id missing or is not an executable

Discussions related to using VirtualBox on Solaris hosts.
Post Reply
rosen
Posts: 9
Joined: 14. Oct 2009, 22:11
Primary OS: Solaris
VBox Version: OSE other
Guest OSses: xp

pkgrm -- /usr/bin/id missing or is not an executable

Post by rosen »

trying to go from 3.1.6 to 3.1.8.
pkgrm SUNWvbox sez:

Do you want to continue with the removal of this package [y,n,?,q] y
## Verifying package <SUNWvbox> dependencies in global zone
## Processing package information.
## Executing preremove script.
Removing VirtualBox services and drivers...
## Sun Microsystems Inc. SunOS 5.10 Generic January 2005
/usr/bin/id missing or is not an executable
Failed.
pkgrm: ERROR: preremove script did not complete successfully

Removal of <SUNWvbox> failed.

/usr/bin/id is there and there's nothing wrong with it.
i'm running this as root.
# which id
/usr/bin/id
# /usr/bin/id
uid=0(root) gid=1(other)
Ramshankar
Oracle Corporation
Posts: 793
Joined: 7. Jan 2008, 16:17

Re: pkgrm -- /usr/bin/id missing or is not an executable

Post by Ramshankar »

Could you please paste output of "ls -lL /usr/bin/id" ?
Oracle Corp.
rosen
Posts: 9
Joined: 14. Oct 2009, 22:11
Primary OS: Solaris
VBox Version: OSE other
Guest OSses: xp

Re: pkgrm -- /usr/bin/id missing or is not an executable

Post by rosen »

26 > ls -lL /usr/bin/id
-r-xr-xr-x 1 root bin 10024 Jan 22 2005 /usr/bin/id
rosen
Posts: 9
Joined: 14. Oct 2009, 22:11
Primary OS: Solaris
VBox Version: OSE other
Guest OSses: xp

Re: pkgrm -- /usr/bin/id missing or is not an executable

Post by rosen »

the pkg preremove script runs /opt/VirtualBox/vboxconfig.sh

vboxconfig.sh runs check_bin_path. check_bin_path does
this
THING=`which id 2> /dev/null`
if test ! -x $THING; then
#fails
fi

and the problem is that THING is getting this:
cat /etc/motd
followed by the normal which id results. so the test
above is checking whether SunOS is an executable.
it's not, so....

now, WHY cat /etc/motd gets shoved in there, i don't know.
jkeil
Posts: 80
Joined: 5. Jun 2008, 16:12

Re: pkgrm -- /usr/bin/id missing or is not an executable

Post by jkeil »

I guess when you start /bin/sh and run "which id", it'll print
the conents of /etc/moth, too?

"which" in /bin/sh is /bin/which, and this is a csh script.
It sources the user's $HOME/.cshrc scfript.

I guess you have a .cshrc script that prints /etc/motd ?
(And the solution should be to move the motd printing
from .cshrc to .login)
Post Reply