Re: # chkconfig: kill at run level 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sun, Dec 5, 2010 at 10:50 AM, Robert Spangler
<mlists@xxxxxxxxxxxxxxxx> wrote:
> On Friday 03 December 2010 19:30, Michael D. Berger wrote:
>
>>  In the control script of my daemon in /etc/init.d?, I have
>>     # chkconfig: 35 97 3
>>
>>  The result of this is that I have links:
>>     /etc/rc.d/rc1.d/K03...
>>     /etc/rc.d/rc3.d/S97...
>>     /etc/rc.d/rc5.d/S97...
>>
>>  As mentioned in a previous thread, my complex daemon throws
>>  an exception when I shutdown.  Perhaps things might be better
>>  if I had:
>>     /etc/rc.d/rc3.d/K03...
>>
>>  Might this be a good idea?  If so, how can I make it happen
>>  automatically?
>
> Check /etc/rc.d/rc6.d and insure that you have K??yourscriptname in there.  It
> looks like your script demon was setup to be run but was never properly setup
> to be shut down.  When shutting down the system the system is switched to run
> level 6.

This is not uncommon: some init scripts merely set up initial
conditions, such as the "freenx" init script that assures that
/tmp/.X11-unix is configured correctly for NX's necessary X sessions.

Others were written by crack monkeys who wouldn't know how to properly
start or stop a daemon if it came with a toggle switch and signes in
six languages: they just slap somethin in "rc.local", then someone
makes them transfer it to a real init script, and someone else has to
clean up the mess.

That's happened several times to me recently. You do *not* add system
users in init scripts, and you don't "cd" to directores that might not
be successfully NFS mounted, then run "rm" commands wherever your
failed "cd" wound up. This way lies system destruction.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux