Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: Normando on July 27, 2008, 07:10:47 AM

Title: /etc/runit/2 What is this file?
Post by: Normando 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.
Title: Re: What is this?
Post by: byte 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 ;)
Title: Re: What is this?
Post by: Normando 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 :)
Title: Re: /etc/runit/2 What is this file?
Post by: slords 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
Title: Re: /etc/runit/2 What is this file?
Post by: CharlieBrady 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.]
Title: Re: /etc/runit/2 What is this file?
Post by: Normando on July 27, 2008, 09:07:25 PM
Thanks Shad and Charly, I understand now the job of this file.
Thank you