SUMMARY: pkgadd problem

From: Leo Crombach (lcrombach@tropel.com)
Date: Fri Feb 27 1998 - 11:58:24 CST


Original Question (with grammar corrections):

We use Jumpstart to perform network installations on our Sun workstations.
Part of that installation includes some custom shell scripts to install
additional software using pkgadd. The problem I am having is that the
pkgadd command fails with the following error:

Installing S1V framegrabber software...
pkgadd: ERROR: freopen(/dev/tty, "a", stdout) failed, errno=6
pkgadd: ERROR: class action script did not complete successfully

Installation of <EDTs1v> failed.

As you can see, the package to be installed is a driver for a framegrabber
that we install in the machines.

Below is the actual portion of the shell script to install this package:

********************************************************************************
# Mount necessary file system for install
mkdir -p /pkg/files
sleep 3
mount -F nfs luau:/export/files /pkg/files
sleep 3

echo "****** Beginning Tropel Configuration ******"

echo "Installing S1V framegrabber software..." 1>&2
pkgadd -n -a /etc/rc3.d/pkgadd_admin -d /pkg/files/archive/s1v/1.7 EDTs1v
********************************************************************************

If I run this same series of commands from the command line the package
installs with no problem.

Any ideas why this fails from within the shell script?

================================================================================
Summary:

First, a couple of people who responded wondered whether the finish script
tried to perform the pkgadd while the OS was still mounted on '/a.' What I
failed to indicate was that the finish script creates an /etc/rc3.d script
which calls the script to perform the pkgadd. Therefore, it does not
execute until after the OS is installed and the machine reboots, so the root
directory is actually '/' when the script runs.

Some of the suggestions I received included:

- Redirecting the output of pkgadd (stderr & stdout) to /dev/null or some file.

- echo "y" | pkgadd -n -a /etc/rc3.d/pkgadd_admin .......

- A bug with pkgadd - ID 1143634.

- Use the -R option to pkgadd.

- Use pkgadd from /tmp.

Of the above listed suggestions, the one I tried was redirecting stderr and
stdout. I redirected stdout to /dev/null, but stderr I redirected to a file
because we want to know if errors do occur during the installation. This
seems to have worked, but the real test will come when we actually try to
use the framegrabber.

Thanks to the following individuals for their feedback:

HCDEB@mead.com
Sean Ward <sdward@uswest.com>
Joel Lee <jlee@thomas.com>
Ray Brownrigg <Ray.Brownrigg@MCS.VUW.AC.NZ>
Matthew Stier <Matthew.Stier@tddny.fujitsu.com>
Jeff Woolsey <woolsey@jlw.com>
"Dmitry A. Bondareff" <dmitry@mmk.ru>

And a special thanks to David Thorburn-Gundlach <david@bae.uga.edu> who
provided me with sample scripts that he uses to perform jumpstart installations.
****************************************************************

Leo Crombach System / Network Administrator
Tropel Corporation Phone: (716) 388-3566
60 O'Connor Road Email: lcrombach@tropel.com
Fairport, New York 14450 URL: http://www.tropel.com

****************************************************************



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:32 CDT