/sbin/init.d script won't run at system startup, but will other times

From: Bruce B. Platt <bbp_at_comport.com>
Date: Wed, 15 Mar 2000 08:41:06 -0500

I suspect I am missing something very simple here.

I have inherited a system with the following problem in starting a daemon
at boot time.

 I have a startup script which is in
/sbin/init.d, pointed to by a link in /sbin/rc3.d, (S57script). This
script contains the lines:

#!/sbin/sh
/usr/local/jrun/jsm-default/startjsm.sh


The startjsm.sh script starts a java run time environment. It needs to
start before the apache web server starts, and
when invoked as above, it doesn't during system bootup.

However, if I (as root) execute the command
/usr/local/jrun/jsm-default/startjsm.sh, the process starts just fine.

Now, if I change the /sbin/init.d script to read:

#!/sbin/sh
su sr765 -c "/usr/local/jrun/jsm-default/startjsm.sh"
exit

then the script runs fine starts the java run time environment and all is well.

The scripts permissions are 755 and is owned by user 65533 and group 10.
As you can see, there is no user with that UID and no group with that GID.

The user sr765 is a member of the user and system groups, and is NOT the
owner of the /usr/local/jrun/jsm-default/startjsm.sh
script, nor is he the owner of the parent directories, and he is not a
member of the group of which these files are "membered" to.

sr765 happens only to be a user of the system who uses the java run time
environment in his work.

What do I not understand about the init process that would allow me to
start this wiithout the su -c in script????

Any and all help solicited, and I will sumamrize.

Regards







+--------------------------------------+
Bruce B. Platt, Ph.D.
Comport Consulting Corporation
78 Orchard Street, Ramsey, NJ 07446
Phone: 201-236-0505 Fax: 201-236-1335
bbp_at_comport.com, bruce_at_ bruce.platt_at_
OR, bruce_at_bbplatt.com
Received on Wed Mar 15 2000 - 13:42:10 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:40 NZDT