supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* sysvinit wrappers
@ 2004-05-19  2:09 Alejandro Mery
  2004-05-19 19:22 ` Gerrit Pape
  0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Mery @ 2004-05-19  2:09 UTC (permalink / raw)


hi,
i'm coding the 'rest of sysvinit' in bash :p and i have three questions
to runit community/boss.

1. to add halt and reboot lines to wtmp, can [-h|-r] added to utmpset?
any better way?
2. how can i know if i'm on runlevel 1, 2 or 3?
3. which would be the right filenames for forced halt/reboot?

Thanks in advance,
Alejandro Mery


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sysvinit wrappers
  2004-05-19  2:09 sysvinit wrappers Alejandro Mery
@ 2004-05-19 19:22 ` Gerrit Pape
  2004-05-20  4:00   ` Alejandro Mery
  0 siblings, 1 reply; 4+ messages in thread
From: Gerrit Pape @ 2004-05-19 19:22 UTC (permalink / raw)


On Tue, May 18, 2004 at 10:09:43PM -0400, Alejandro Mery wrote:
> i'm coding the 'rest of sysvinit' in bash :p and i have three questions

I would be interested in how you use it, and how you integrate it with
runit, although I'm not completely sure about what the 'rest of
sysvinit' is.

> 1. to add halt and reboot lines to wtmp, can [-h|-r] added to utmpset?
> any better way?

Or maybe a -n <name> option to specify the utmp_name.  If you extend
utmpset, please keep cross-platform compatibility in mind.   

> 2. how can i know if i'm on runlevel 1, 2 or 3?

If I understand you correctly you mean stages, not runlevels.  You're
either started from /etc/runit/1, 2, or 3; if it needs to be
distinguishable, you could use command line options.  What do you need
this for?

> 3. which would be the right filenames for forced halt/reboot?

Hmm, don't know.

Regards, Gerrit.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sysvinit wrappers
  2004-05-19 19:22 ` Gerrit Pape
@ 2004-05-20  4:00   ` Alejandro Mery
  2004-05-20 18:11     ` Gerrit Pape
  0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Mery @ 2004-05-20  4:00 UTC (permalink / raw)
  Cc: supervision

Gerrit Pape wrote:

>On Tue, May 18, 2004 at 10:09:43PM -0400, Alejandro Mery wrote:
>  
>
>>i'm coding the 'rest of sysvinit' in bash :p and i have three questions
>>    
>>
>
>I would be interested in how you use it, and how you integrate it with
>runit, although I'm not completely sure about what the 'rest of
>sysvinit' is.
>  
>
the binaries included in sysvinit in addition to init itself. i want to
provide the 'standard' tools without having both (sysvinit and runit,
net-tools and iproute2, etc...)

>>1. to add halt and reboot lines to wtmp, can [-h|-r] added to utmpset?
>>any better way?
>>    
>>
>
>Or maybe a -n <name> option to specify the utmp_name.  If you extend
>utmpset, please keep cross-platform compatibility in mind.
>  
>
i didn't wanted to code in c, i wanted just a couple of wrappers to
'emulate' clasic behavior and call real tools to do the real jobs.
but if that's the only choice...

>>2. how can i know if i'm on runlevel 1, 2 or 3?
>>    
>>
>
>If I understand you correctly you mean stages, not runlevels.  You're
>either started from /etc/runit/1, 2, or 3; if it needs to be
>distinguishable, you could use command line options.  What do you need
>this for?
>
the halt/reboot wrapper need to know if it's on stage 1 or 2 to see if
init really halts or reboots or it calls init [0|6].

Alejandro




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sysvinit wrappers
  2004-05-20  4:00   ` Alejandro Mery
@ 2004-05-20 18:11     ` Gerrit Pape
  0 siblings, 0 replies; 4+ messages in thread
From: Gerrit Pape @ 2004-05-20 18:11 UTC (permalink / raw)


On Thu, May 20, 2004 at 12:00:07AM -0400, Alejandro Mery wrote:
> Gerrit Pape wrote:
> >On Tue, May 18, 2004 at 10:09:43PM -0400, Alejandro Mery wrote:
> >>i'm coding the 'rest of sysvinit' in bash :p and i have three questions
> >I would be interested in how you use it, and how you integrate it with
> >runit, although I'm not completely sure about what the 'rest of
> >sysvinit' is.
> >
> the binaries included in sysvinit in addition to init itself. i want to
> provide the 'standard' tools without having both (sysvinit and runit,
> net-tools and iproute2, etc...)

Hmm, I wouldn't bother to simply implement the same tools that already
exist, unless there's very good reason to do so.  If there isn't, why
not simply use the existing tools?  Instead I would focus on the actual
functionality you want to have, and try to support this in a convenient
way; we already know that the utmp concept for example has its problems.

> >>1. to add halt and reboot lines to wtmp, can [-h|-r] added to utmpset?
> >>any better way?
> >Or maybe a -n <name> option to specify the utmp_name.  If you extend
> >utmpset, please keep cross-platform compatibility in mind.
> >
> i didn't wanted to code in c, i wanted just a couple of wrappers to
> 'emulate' clasic behavior and call real tools to do the real jobs.
> but if that's the only choice...

As far as I know there only is a C interface to the utmp/wtmp database,
at least a portable one.

> >>2. how can i know if i'm on runlevel 1, 2 or 3?
> >If I understand you correctly you mean stages, not runlevels.  You're
> >either started from /etc/runit/1, 2, or 3; if it needs to be
> >distinguishable, you could use command line options.  What do you need
> >this for?
> >
> the halt/reboot wrapper need to know if it's on stage 1 or 2 to see if
> init really halts or reboots or it calls init [0|6].

If they do completely different things (hard reboot vs running `init 6`),
I would give them different names.

Regards, Gerrit.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-05-20 18:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-19  2:09 sysvinit wrappers Alejandro Mery
2004-05-19 19:22 ` Gerrit Pape
2004-05-20  4:00   ` Alejandro Mery
2004-05-20 18:11     ` Gerrit Pape

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).