SUMMARY: ksh script in system startup

From: David W. Blaine (blained@gdls.com)
Date: Mon Jul 26 1999 - 10:00:35 CDT


Thanks everyone who responded.

"Kruse, Jason K." <jason.kruse@teldta.com>
Matthew Stier <Matthew.Stier@tddny.fujitsu.com>
Bill Hathaway <wdh@perfectorder.com>
Casper Dik <casper@holland.sun.com>
kevin@joltin.com (Kevin Sheehan {Consulting Poster Child})

First off, the rc scripts do not run ksh scripts well. They will run as Bourne
shell only. I thought I took this into account when I changed /etc/rc3 to ksh.
Many people mentioned that I made a mistake. What I didn't realize was /etc/rc3
is linked to /sbin/rc3. So when I added /etc/rc3 to jumpstart it removed the
link and didn't update the script I intended. With the right script running ksh,
everything works great!

David Blaine

------------- Begin Forwarded Message -------------

Date: Fri, 23 Jul 1999 13:58:45 -0400 (EDT)
From: "David W. Blaine" <blained@gdls.com>
Subject: Q: ksh script in system startup
To: sun-managers@sunmanagers.ececs.uc.edu
MIME-Version: 1.0
Content-MD5: xeLqJizzpHKcLiixLRJyNg==

Hi Sun-gurus:

I have another perplexing question. I wrote a ksh script which applies patches.
This script is part of the jumpstart and is added in /etc/rc3.d. The script runs
fine, if I run it from the command line. However, when I jumpstart a machine and
it goes to run this script after the first reboot, it simply doesn't run. Some
investigation found that it spit out errors on the console:

/etc/rc3.d/S99install_patches_reboot: function: not found
/etc/rc3.d/S99install_patches_reboot: function: not found
/etc/rc3.d/S99install_patches_reboot: function: not found
/etc/rc3.d/S99install_patches_reboot: function: not found
/etc/rc3.d/S99install_patches_reboot: test: argument expected

These errors looked like it wasn't running in ksh. But I double checked the
first line and it certainly is /bin/ksh. I questioned whether the scripts that
process /etc/rc3.d scripts could handle ksh. Therefore, I changed /etc/rc3 to
ksh and subshell all /etc/rc3.d scripts as ksh. This change didn't help. Any
clues??

Machines are jumped with Solaris 2.6 hw 03/98 (if it makes a difference).

------------------
David Blaine (blained@gdls.com)
Computer Systems Engineer
CSC for GDLS
Phone: 810-825-7650

------------- End Forwarded Message -------------



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:24 CDT