View Single Post
Old 07-11-06, 09:10 AM   #1
Registered User
Join Date: Jun 2005
Posts: 10
Default nvidia drivers and jumpstart

I have a JumpStart system which allows for execution of arbitrary scripts at the end of the installation. I figured that it'd be easy enough to get it to run the NVIDIA install script to install the drivers, but I don't think it ends up working right. So here's my wish-list;

1) include the "install" script (contained within the self extracting tar ball) into the respective postinstall directives per package and the accompanied files ought to be included in either package as well. Specifically it seems the following sections apply;

# Install graphics private misc module (gfx_private).
#   The Sun supplied module will be installed in
#   /platform/i86pc/kernel/misc, which is the first
#   directory searched.  For systems without this
#   module, install one in /platform/misc, which is
#   searched after the primary path.
cp -fp gfx_private/SunOS-${OSVER}/gfx_private /kernel/misc
cp -fp gfx_private/SunOS-${OSVER}/amd64/gfx_private /kernel/misc/amd64

# Check for OpenGL switcher and make symlinks for libraries
# and headers if it doesn't exist.
svcprop -q -p options/vendor application/opengl/ogl-select
if [ $? -ne 0 ]; then
  ln -sf ../X11/lib/NVIDIA/ /usr/lib
  ln -sf ../X11/lib/NVIDIA/ /usr/lib
  ln -sf ../../X11/lib/NVIDIA/amd64/ /usr/lib/amd64
  ln -sf ../../X11/lib/NVIDIA/amd64/ /usr/lib/amd64
  if [ -d /usr/X11/lib/GL ]; then
      # Replace the symlinks for the MESA client OpenGL libraries
      ln -sf NVIDIA/ /usr/X11/lib
      ln -sf NVIDIA/ /usr/X11/lib
      ln -sf ../NVIDIA/amd64/ /usr/X11/lib/amd64
      ln -sf ../NVIDIA/amd64/ /usr/X11/lib/amd64
  if [ ! -d /usr/include/GL ]; then
      mkdir /usr/include/GL
  ln -sf ../../X11/include/NVIDIA/GL/glxext.h /usr/include/GL
  ln -sf ../../X11/include/NVIDIA/GL/glx.h /usr/include/GL
  ln -sf ../../X11/include/NVIDIA/GL/glext.h /usr/include/GL
  ln -sf ../../X11/include/NVIDIA/GL/gl.h /usr/include/GL
  ln -sf NVIDIA/ /usr/X11/lib/modules/extensions
  ln -sf NVIDIA/ /usr/X11/lib/modules/extensions
2) ensure that relative paths are used throughout. The pkgadd(1M) command will pay attention to the -R option which supplies an alternate root. Such a relocated package works for files even with absolute paths, but the pre/post (un)install directives do fail unless the paths are correct.

It is possible for me to dissect the shell script NVIDIA provides and integrate that stuff with my JumpStart system, but I would very much like to just drop those packages in place rather than having the possibility of my making mistakes. As far as I can see, it should be possible to integrate all features provided by the install shell script into pkg format. If I can be of any assistance at all in any way, I have written pkg prototype files before, I would be happy to lend a hand.


astade2 is offline   Reply With Quote