Re: Chkconfig



mbrugo@xxxxxxxxx wrote:
Hi to all.

I need to add a new service so i 've used a script found on /etc/init.d
and modified with my options.

Then i've used chkconfig to add my script to start and stop on each
runlevel.

chkconfig --add em (em is my script) :

#!/bin/sh
#
# chkconfig: 2345 99 35
# description: Starts and stops the EM (Oracle 10G)
# #
# script: /opt/oracle/app/oracle/product/EM10G/SH/EM.SH (root)
# script: /opt/oracle/app/oracle/product/EM10G/SH/em.SH (em10g)

so on level 3,4,5 i 've a S99 link and 0,1,6 i've a K35.

My question is:

why when server start, my em script run but when i do a reboot (i
suppose init 6) my script doesn't ?


Make sure that the /etc/init.d/em script has the permissions set to executable.

Run the command "who -r" to see what the normal run level is for your system.

Run the command "chkconfig --list em" to list the off/on states for each run level.

If it's not set to "on" for your run level, for example level 5,
run the command "chkconfig --level 5 em on"

Look at /var/log/messages for clues.

--
Greg














.



Relevant Pages

  • RE: RH9 Processes Failing
    ... This section tells chkconfig what runlevels to start and stop the script ... Enable daily run of yum, ... This is the bit that does the actual startup - it creates a new command ...
    (RedHat)
  • Re: One-box, one-user: could I have done it all with chkconfig?
    ... > conclusion of system setup. ... chkconfig is all you really need. ... The script could be quite useful _if_ you write a robust (ie., ... change distros) the script will have to reflect those changes. ...
    (comp.os.linux.security)
  • Re: using chkconfig
    ... >> error that the service squid is not supported by ... > the top to support chkconfig. ... Our startup script does have the lines. ... Squid - Internet Object Cache. ...
    (RedHat)
  • Where to find logs/traces when a service on RedHat does not start
    ... chkconfig --list | grep cruise ... This is my script: ... # echo PARPIDs $PARPID ...
    (comp.unix.shell)
  • Re: edit the bootup sequence
    ... |> Afterwards you don't need to fiddle with chkconfig or those ... | - Edit the script, then add to the first lines of the script these lines ... It is annoying to have to name the runlevels for which this script ... is very simple to menage startup scripts. ...
    (RedHat)