Koozali.org: home of the SME Server

/etc/runit/2 What is this file?

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
/etc/runit/2 What is this file?
« on: July 27, 2008, 07:10:47 AM »
Under /etc/runit I found a file named "2" (number two, without quotes) and with the following content:

Code: [Select]
#!/bin/sh

PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin

exec </dev/null
exec runsvdir -P /service 'log: ..........................................
with more than 350 dots.

I can't remember anything similar, but found in two servers, so I think there is no hack or something.
« Last Edit: July 27, 2008, 06:36:49 PM by Normando »

Offline byte

  • *
  • 2,183
  • +2/-0
Re: What is this?
« Reply #1 on: July 27, 2008, 01:27:41 PM »
Under /etc/runit I found a file named "2" (number two, without quotes) and with the following content:

Code: [Select]
#!/bin/sh

PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin

exec </dev/null
exec runsvdir -P /service 'log: ..........................................
with more than 350 dots.

I can't remember anything similar, but found in two servers, so I think there is no hack or something.

I think that file is an emergency shell or something, if you do rpm -qf you can see what package it came from.

PS. Always give a better subject title ;)
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: What is this?
« Reply #2 on: July 27, 2008, 06:40:57 PM »
I think that file is an emergency shell or something, if you do rpm -qf you can see what package it came from.

PS. Always give a better subject title ;)
Uppsss, yes, you are right. Thank you Gavin

Code: [Select]
# rpm -qf /etc/runit/2
e-smith-runit-1.0.0-6.el4.sme

So, the package come from SME :)

Offline slords

  • *****
  • 235
  • +3/-0
Re: /etc/runit/2 What is this file?
« Reply #3 on: July 27, 2008, 08:05:55 PM »
It is actually the file/program that inittab is running.  That is the main runit script that inittab keeps track of and then runit keeps track of most of our daemons to ensure they are running.  See /etc/inittab.

sv:7:respawn:/etc/runit/2
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs,
and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -- Rich Cook

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: /etc/runit/2 What is this file?
« Reply #4 on: July 27, 2008, 08:48:53 PM »
See these for documentation:

http://smarden.org/runit/
http://smarden.org/runit/replaceinit.html

[BTW, those are the first two hits when you google for /etc/runit/2.]

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: /etc/runit/2 What is this file?
« Reply #5 on: July 27, 2008, 09:07:25 PM »
Thanks Shad and Charly, I understand now the job of this file.
Thank you