pkgadd during a reboot

pkgadd during a reboot

Post by chad schroc » Thu, 20 May 1999 04:00:00



Using: Solaris 2.7 3/99, Ultra 10 and 60.

I am trying to install a package on a system during a reboot,
i.e.: as the system is booting, a script in /etc/rc2.d runs
pkgadd.  In theory and on the command line, this works perfectly.
However, as with many things, theory and reality diverge greatly.

During the boot, pkgadd starts, then gives this error and dies:
  pkgadd: ERROR: freopen(/dev/tty, "r", stdin) failed, errno=6
  pkgadd: ERROR: request script did not complete successfully

My best guess is that pkgadd does not like running without being
attached to a tty.  Is this a safe assumption?  If it is, how can
I fake pkgadd into thinking it is attached to a tty?

Thanks for any help or hints.

(And, since DejaNews royally screwed up their interface, please
mail me a copy of what you post.  Thanks)

chad

--
chad at radix dot net

--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---

 
 
 

pkgadd during a reboot

Post by Frank Braue » Fri, 21 May 1999 04:00:00


I'm not familar with Solaris 2.7. But if I'm right the problem is that
pkadd try to ask you something (i.e. that there are suid,sgid files in
the package and/or there are pre- and postinstall scripts run roots
context and 'are you sure..'). There is a way to answer automaticly yes
to all questions, but I don't know exactly how. Please read 'man
pkgadd'.

I hope this helps.

Frank


> Using: Solaris 2.7 3/99, Ultra 10 and 60.

> I am trying to install a package on a system during a reboot,
> i.e.: as the system is booting, a script in /etc/rc2.d runs
> pkgadd.  In theory and on the command line, this works perfectly.
> However, as with many things, theory and reality diverge greatly.

> During the boot, pkgadd starts, then gives this error and dies:
>   pkgadd: ERROR: freopen(/dev/tty, "r", stdin) failed, errno=6
>   pkgadd: ERROR: request script did not complete successfully

> My best guess is that pkgadd does not like running without being
> attached to a tty.  Is this a safe assumption?  If it is, how can
> I fake pkgadd into thinking it is attached to a tty?


 
 
 

pkgadd during a reboot

Post by chad schroc » Fri, 21 May 1999 04:00:00


Thanks for the tip.  I'm already running pkgadd (-a) to tell
it not to ask questions and just do.  One of the local Sun SEs
suggested using pkgask/pkgadd -r, but that didn't work either.

One other person sent me a note saying that the error that pkgadd
is reporting, errno=6, means that the process tried to address a
device that it didn't have access to (in this case a tty) and
suggested Expect.

So, now I am working on splitting the postinstall part of the patch
from the rest of it.  The package is being installed during a
Jumpstart and the postinstall is running during the reboot.  

This is all for SUNWspci, btw.

chad


> I'm not familar with Solaris 2.7. But if I'm right the problem is that
> pkadd try to ask you something (i.e. that there are suid,sgid files in
> the package and/or there are pre- and postinstall scripts run roots
> context and 'are you sure..'). There is a way to answer automaticly yes
> to all questions, but I don't know exactly how. Please read 'man
> pkgadd'.

> I hope this helps.

> Frank


> > Using: Solaris 2.7 3/99, Ultra 10 and 60.

> > I am trying to install a package on a system during a reboot,
> > i.e.: as the system is booting, a script in /etc/rc2.d runs
> > pkgadd.  In theory and on the command line, this works perfectly.
> > However, as with many things, theory and reality diverge greatly.

> > During the boot, pkgadd starts, then gives this error and dies:
> >   pkgadd: ERROR: freopen(/dev/tty, "r", stdin) failed, errno=6
> >   pkgadd: ERROR: request script did not complete successfully

> > My best guess is that pkgadd does not like running without being
> > attached to a tty.  Is this a safe assumption?  If it is, how can
> > I fake pkgadd into thinking it is attached to a tty?

 
 
 

1. How to enter values during pkgadd installation and pass those values to postinstall process?

All,

Can I pass inputs into the command so that they will be processed by
postinstall? For example, can i do the following:

"pkgadd -d software_a.pkg STRING1 STRING2" ?

STRING1 and STRING2 are just string variables.

I would like to be able to doing something in the postinstall section of the
spec file such as:

"echo $STRING1"
"echo $STRING2"

Of course, I will do more than just echo, but having the abilities to do
echo meaning I can use those strings however I want during the postinstall
process. Essentially, STRING1 can be a servername, and the postinstall
section of the spec file needs to process this servername or start processes
with this string.

Thanks

Barry

2. swedish in an XmTextField

3. postinstall script doesn't run during pkgadd

4. Finding system default timezone

5. How to create a package that will run a script during pkgadd

6. Can not run Netscape

7. pkgadd: Can pkgadd create non-root-owned symbolic links?

8. Size of mem_map array?

9. reboot error reboot error reboot error

10. Compaq 6000 reboots and reboots and reboots

11. umount and RPC errors during reboot

12. bootblk can't find the boot program after reboot during install

13. Reboot during installation with all distributions