Find the answer to your Linux question:
Results 1 to 5 of 5
Hello, I have an application that absolutely needs the kill script to run on reboot/shutdown. I have the service added to chkconfig running at runlevels 3,4 and 5. I have ...
  1. #1
    Just Joined!
    Join Date
    Feb 2009
    Posts
    54

    Kill scripts not being executed upon reboot

    Hello,

    I have an application that absolutely needs the kill script to run on reboot/shutdown. I have the service added to chkconfig running at runlevels 3,4 and 5. I have the necessary S and K scripts (S is 99 and K is 01) in /etc/r3.d, rc4.d and rc5.d. I also have the K01 link in /etc/rc6.d.

    When I issue a `reboot` from runlevel 3, I dont see any of the K scripts executing, although the S script does run at startup. I can tell this because the first line in the init.d script is to write a line to the application log file - "starting" for start and "stopping" for stop. I see the "starting" lines, but no "stopping" lines at all unless the script is run manually with a stop argument.

    I am RHEL5 release 5.1 (Tikanga). Has anyone else come across similar issues? Perhaps one of the Guru's will be kind enough to take a look?

    Thanks in advance.

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    Move your 'K' script to rc6.d directory.
    INIT6 is run for shutdown/reboot

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Feb 2009
    Posts
    54
    Yes I have already tried that - please see last line on 1st paragraph of original question. Believe this is a RHEL 5 bug.

  4. #4
    Just Joined!
    Join Date
    Feb 2009
    Posts
    54
    Issue was resolved in another forum. Correct answer, if anyone is interested, is that /etc/rc looks for a file under /var/locl/subsys/functionname to see if K scripts need to be run for that function.

  5. #5
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    That should be '/var/lock/subsys'

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...