Troubleshooting init.d script

Login or Register to Reply

Thread Tools Search this Thread
# 1  
Troubleshooting init.d script

This is what I did:

1. I wrote a simple init.d script (

2. I placed it under /etc/init.d (where many other default scripts already are)
3. Set the perms to 755
4. Run: update-rc.d defaults

I can run it perfectly by doing:

/etc/init.d/ start

But it doesn't run at startup. What am I missing?
# 2  
Did you set the user and group of the script to root?
# 3  
Did you check de rc[0-n].d run level links? Do you have LSB comment headers in your init script?

From the man page:
When run with the defaults option, update-rc.d makes links named
/etc/rcrunlevel.d/name that point to the script /etc/init.d/name, using runlevel and
dependency information from the init.d script LSB comment header.
If any files named /etc/rcrunlevel.d/??name already exist then update-rc.d does
Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
init-script failing because of /etc/rc.d/init.d/functions
I encountered a problem on one of our database servers. OS: CentOS 5.5 final Kernel: 2.6.18-238.5.1.el5.028stab085.2 (OpenVZ kernel) We wrote some DB-Start/Stop-scripts ("/db2/admin/scripts_dba/start_services.ksh" and ".../stop_services.ksh") to start the database instances. (Database...... Red Hat
Red Hat
Problem on init 0, execution is the same with init 6
Hi, I am experiencing a weird thing on my SUNFIRE machine with Solaris 9 OS. When I do init 0 to shutdown the machine to go to ok prompt, what it did was shutdown and reboot like an init 6 command do. I did check the corresponding rc scripts that were involved with init 0 and compared with rc...... UNIX for Advanced & Expert Users
UNIX for Advanced & Expert Users
How to I change init levels after typing init 1
Dear all, I typed in init 1 on my redhat box as root and according to wikipedia ( 1 Single-User Mode Does not configure network interfaces, start daemons, or allow non-root logins So now I can't connect back to it. How do I change the init back to 3?...... Linux
Init 6 & Init 0 problem
Hi Expert, I have encountered some problem with my SUN system. Everytime when i issue command #init 6 OR #init 0 it just logout and prompt for login again instead of rebooting the server when run init 6 and system shutdown when run init 0.. I can only reboot the system using reboot ... Was...... UNIX for Advanced & Expert Users
UNIX for Advanced & Expert Users
Troubleshooting Script
I am fairly new to Unix (Sun OS) scripting with Ksh, and I could use a little help troubleshooting my script. When I run it, I get the error "if unexpected" on the function setYear. If I comment out the setYear function, I get the error "for unexpected" on the function sendEmails. This leads me...... Shell Programming and Scripting
Shell Programming and Scripting

Featured Tech Videos