[CentOS] Removing respawning process from inittab w/o killing it

Timo Schoeler timo.schoeler at riscworks.net
Wed Nov 18 10:35:11 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

thus Timo Schoeler spake:
| thus William L. Maltby spake:
| | On Wed, 2009-11-18 at 10:56 +0100, Timo Schoeler wrote:
| |> -----BEGIN PGP SIGNED MESSAGE-----
| |> Hash: SHA1
| |>
| |> Hi list,
| |>
| |> I need to remove an entry of inittab which is used to (re)spawn a
| process:
| |>
| |> mydemon:2345:respawn:/usr/sbin/mydemon >/dev/null 2>&1
| |>
| |> So, I would comment out that entry and reload init running ``telinit
| |> q''. IIRC, this would lead to the currently running daemon being
killed.
| |> I don't want to /try/ whether I'm right, as those are production
systems.
| |>
| |> Is there any possibility (given that ``telinit q'' kills the running
| |> process) to 'keep the process alive' _and_ reload init?
| |
| | If I understand what "man telinit" intends, it looks like the "-u" or
| | "-U" might do what you want.
|
| It says:
|
| U or u tell  init  to  re-execute itself (preserving the state). No re-
| examining of /etc/inittab file happens. Run level should be  one
| of Ss12345, otherwise request would be silently ignored.
|
| I'll try it; it doesn't seem to touch the running state, however, it
| also doesn't re-examine /etc/inittab (but that is what I actually want
| it to do).

Just tried it: Seems to work that way. Thanks again!

| | Test it on some local desktop system since you can't test on your
| | production?
|
| I prepare an equal setup in VirtualBox, so I can test beforehand.
|
| Thanks,
|
| Timo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with CentOS - http://enigmail.mozdev.org

iD8DBQFLA83ffg746kcGBOwRArCcAJ9jzetSjTFkMp5F6wF9BS+/O18I7QCfUqOC
L/4TQFyq20zOPF4XSaiX8Fg=
=gJyU
-----END PGP SIGNATURE-----


More information about the CentOS mailing list