Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Startup scripts not executing from rc3.d on reboot

807557Jun 12 2008 — edited Jun 13 2008
I have 3 startup scripts that reside in /etc/init.d for Apache, Samba, and MySQL. I have removed all the Solaris based packages for these applications as I prefer to download and compile my own installations of these applications. When the system is rebooted, Apache will startup with no problem. Samba and MySQL will not startup after a reboot, however, I can manually execute the scripts from either /etc/init.d or /etc/rc3.d and they will startup and be fully functional. I have tried both hard and soft links to the /etc/init.d scripts and it appears to not make a difference....the scripts still won't execute on their own.

The only way I have been able to force Samba and MySQL to startup automatically after a reboot is to place the following lines within the scripts:

LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH

I have the two lines above also inclusive in my root .profile file. Every script is using #!/bin/sh for the shebang line. I have also tried including the library information above as I compile the software. Here is what I am using for compiling the MySQL:

LD_LIBRARY_PATH=/var/mysql/lib/mysql:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

CC=gcc CXX=gcc \
./configure prefix=/var/mysql with-low-memory --libdir=/usr/local/lib

Here is what my Samba rc scripts look like, as you can tell these are setup as hard links and all have the same inode. I have also seen variations in my research where hard links are also used to kill the script in other run levels, tried that also to no avail. I have also tried putting the start script in rc2.d instead of rc3.d...no difference there either.
----------------------------------------------------------------
438 -rwxr--r-- 3 root sys 373 Jun 10 15:20 /etc/init.d/samba
438 -rwxr--r-- 3 root sys 373 Jun 10 15:20 /etc/rc0.d/K03samba
438 -rwxr--r-- 3 root sys 373 Jun 10 15:20 /etc/rc3.d/S99samba

Here is the MySQL rc script setup where I am using symbolic links (also tried hard links) and MySQL won't startup automatically on reboot.
---------------------------------------------------
435 -rwxr--r-- 1 root sys 11618 Jun 12 08:49 /etc/init.d/mysql.server
174 lrwxrwxrwx 1 root other 24 Jun 10 12:01 /etc/rc0.d/K01mysql -> /etc/init.d/mysql.server
1528 lrwxrwxrwx 1 root other 24 Jun 10 12:01 /etc/rc3.d/S99mysql -> /etc/init.d/mysql.server

Finally, here is the env output from my root profile
-----------------------------------------------------------------------------
_=/usr/bin/env
MANPATH=/opt/VRTS/man:/usr/dt/share/man:/usr/dt/man:/usr/share/man:/usr/openwin/ share/man:/usr/openwin/man:/usr/man:/usr/local/man:/usr/symcli/man:/usr/local/sa mba/man:/opt/SUNWexplo/man:/opt/SUNWppro/man
LANG=C
SSH_TTY=/dev/pts/3
PATH=/usr/bin:/usr/sbin:/usr/lib/vxvm/bin:/usr/sadm/bin:/etc/vx/bin:/opt/VRTSvms a/bin:/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/usr/local/samba/bin:/opt/sfw/ bin:/usr/platform/SUNW,Sun-Blade-100/sbin:/root/bin:/sbin:/opt/VRTSvcs/bin:/usr/ symcli/bin:/apps/mysql/bin:/usr/local/samba/lib:/usr/local/samba/include:/usr/lo cal/lib:/usr/lib:/lib:/usr/local/apache/bin:/opt/RICHPse/bin:/opt/SUNWppro/bin:/ usr/lib/fs/vxfs:/opt/csw/bin:/opt/SUNWexplo/bin:/opt/VRTSob/bin:/usr/sfw/bin:/usr/ucb
EDITOR=vi
HISTFILE=/root/.history.root.root
LOGNAME=root
MAIL=/usr/mail/root
USER=root
SHELL=/sbin/sh
HOME=/root
TERM=xterm
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib:/usr/local/ssl/lib
PWD=/root
TZ=US/Pacific

I am assuming that my problem may be profile related but I am not sure, otherwise, why would exporting the library path in the scripts make them execute upon reboot ??

Any help or direction would be appreciated. This is on Solaris 10 that has the most recent patch bundle applied.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 11 2008
Added on Jun 12 2008
11 comments
1,102 views