Ticket #2351 (closed defect: fixed)
Solaris install successful even with postinstall failure
Reported by: | injinius | Owned by: | |
---|---|---|---|
Priority: | major | Component: | installer |
Version: | VirtualBox 2.0.2 | Keywords: | Solaris postinstall vboxdrv |
Cc: | Guest type: | other | |
Host type: | Solaris |
Description
I tried installing VirtualBox on a Solaris 10 box using the Readme.txt instructions. The following step:
pkgadd -G -d VirtualBox-2.0.2-SunOS-amd64-r36488.pkg
produced the following error messages during the postinstall phase: [...] ## Executing postinstall script. Configuring VirtualBox kernel module... /opt/VirtualBox/vboxdrv.sh: /usr/xpg4/bin/id: not found /opt/VirtualBox/vboxdrv.sh: test: argument expected /opt/VirtualBox/vboxdrv.sh: /usr/xpg4/bin/id: not found /opt/VirtualBox/vboxdrv.sh: test: argument expected Configuring VirtualBox NetFilter kernel module... /opt/VirtualBox/vboxdrv.sh: /usr/xpg4/bin/id: not found /opt/VirtualBox/vboxdrv.sh: test: argument expected Creating links... devfsadm: driver failed to attach: vboxdrv Done.
but the package manager still thought the installation went well:
Installation of <SUNWvbox> was successful.
Apparently, the problem was that this machine was missing the /usr/xpg4/bin/id command (from the SUNWxcu4 package). In any case, I'm assuming that the "devfsadm: driver failed to attach: vboxdrv" message means that the install wasn't successful and that the overall package installation should have failed too.
Change History
comment:2 Changed 10 years ago by injinius
It was Solaris 10 u5. I don't have access to the machine right now, so I can't produce the /etc/release information. In any case, I don't see how the Solaris version makes that much of a difference. I'm assuming this is a shell scripting bug (i.e. not checking the error status of vboxdrv.sh) which allows the install to complete successfully.
comment:3 Changed 10 years ago by ramshankar
The Solaris version becomes relevant because most other S10 u5s has /usr/xpg4/bin/id. I will fix the installer, thanks for the report.
comment:4 Changed 10 years ago by injinius
Thanks for the quick response. I can't say why the xpg4 "stuff" wasn't available on this system. It is there on some other Solaris 10 u5 boxes I have access to. Again, hopefully this fix will make the postinstall a little bit more bulletproof.
comment:5 Changed 9 years ago by frank
- Status changed from new to closed
- Resolution set to fixed
Please reopen if necessary.
comment:6 Changed 9 years ago by bgstansell
- Status changed from closed to reopened
- Resolution fixed deleted
I just installed 2.2.4 on SXCE B115 without the SUNWxcu4 and vboxdrv.sh failed. The check_root function has a problem...it tries /usr/xpg4/bin/id first, then wants to fall back to the result of 'which id', but the logic isn't right.
if test ! -f "$idbin"; then
found=which id | grep "no id" if test ! -z "$found"; then
abort "Failed to find a suitable user id binary! Aborting"
else
idbin=$found
fi
fi
$found is set to an error string if id isn't found (because of the grep), and is empty if it is, breaking the "idbin=$found" portion (it's set to nothing).
One way to fix it is to use "idbin=which id" in the else part, which is how I hacked it to work.
comment:7 Changed 9 years ago by ramshankar
This has been fixed in internal SVN. Thank you for reporting.
comment:8 Changed 9 years ago by ramshankar
- Status changed from reopened to closed
- Resolution set to fixed
comment:9 Changed 9 years ago by bgstansell
- Status changed from closed to reopened
- Resolution fixed deleted
The check_root function seems to have issues in the 3.0.8 release. It has:
if test ! -f "$found" || test ! -h "$found"; then
and should really be
if test ! -f "$found" && test ! -h "$found"; then
Thanks.
Bryan
comment:10 Changed 8 years ago by ramshankar
It should be
if test ! -x "$found"; then
Will be fixed in SVN, thanks for the report.
comment:11 Changed 8 years ago by ramshankar
- Status changed from reopened to closed
- Resolution set to fixed
Fixed in 3.0.12
Which version of Solaris 10 is this? u4 or u5 or..? Could you please paste output of cat /etc/release ?