Charlie Brady | 1 Oct 2004 21:31
Picon
Picon

Re: kdm not working in run script - SOLVED!!


On Fri, 1 Oct 2004, John Nielsen wrote:

> This sheltered life of the daemons however seems to be causing me some 
> problems however.

Whatever problems it might be causing you now will be more than repaid by 
the problems it will save you over the life of your systems. Having an 
entirely predictable and controlled environments in which daemons run is a 
very good thing indeed.

---
Charlie

John Nielsen | 1 Oct 2004 22:12
Picon

Re: kdm not working in run script - SOLVED!!

On Friday 01 October 2004 21:31, Charlie Brady wrote:
> On Fri, 1 Oct 2004, John Nielsen wrote:
> > This sheltered life of the daemons however seems to be causing me some
> > problems however.
>
> Whatever problems it might be causing you now will be more than repaid by
> the problems it will save you over the life of your systems. Having an
> entirely predictable and controlled environments in which daemons run is a
> very good thing indeed.

Heh, dont worry... I am allready more than completely sold.

Quite frankely I cant for the life of me imagine why I have never seen any 
distros using a managed boot system like runits. Runit has really showed me 
that sysvinit doesnt really contain much more than what I could code in bash 
in a few afternoons.

My biggest problem right now is that this way of doing things is still new to 
me and I find myself having to tear down a lot of assumptions about how linux 
works. Runit is turning out to be a great learning experience for me. 

I did a few tests and I dont think the problem im having shutting down is 
caused by runit. It shuts down fine when I run 'init 0' from a konsole. Lets 
see if google can help me with this. If not, ill find a KDE list and ask for 
help there.

Thanks for your help on this. This list is turning out to be friendlier than 
most.

John
(Continue reading)

Vincent Danen | 3 Oct 2004 04:29

Re: kdm not working in run script - SOLVED!!


On 1-Oct-04, at 2:12 PM, John Nielsen wrote:

>>> This sheltered life of the daemons however seems to be causing me 
>>> some
>>> problems however.
>>
>> Whatever problems it might be causing you now will be more than 
>> repaid by
>> the problems it will save you over the life of your systems. Having an
>> entirely predictable and controlled environments in which daemons run 
>> is a
>> very good thing indeed.
>
> Heh, dont worry... I am allready more than completely sold.
>
> Quite frankely I cant for the life of me imagine why I have never seen 
> any
> distros using a managed boot system like runits. Runit has really 
> showed me
> that sysvinit doesnt really contain much more than what I could code 
> in bash
> in a few afternoons.

Annvix uses runit... I'm not aware of any others that do, but Annvix 
uses it completely out of the box.  The only service that is not run 
under runit is autofs, which I still have to figure out.  A few others 
are causing me some grief, but for the most part it is incredibly 
reliable.  (Note that I just switched from using daemontools to runit 
it for the distro about 2-3 weeks ago and the transition was fairly 
(Continue reading)

Charlie Brady | 3 Oct 2004 19:05
Picon
Picon

supervising autofs (was Re: kdm not working in run script - SOLVED!!)


On Sat, 2 Oct 2004, Vincent Danen wrote:

> Annvix uses runit... I'm not aware of any others that do, but Annvix 
> uses it completely out of the box.  The only service that is not run 
> under runit is autofs, which I still have to figure out.

I think this patch (untested) will give you the -f option you need:

--- autofs-4.0.0pre10/daemon/automount.c.orig	2004-08-22 19:40:30.000000000 -0400
+++ autofs-4.0.0pre10/daemon/automount.c	2004-08-22 20:03:44.000000000 -0400
 <at>  <at>  -1143,7 +1143,7  <at>  <at> 
   return -1;
 }

-static void become_daemon(void)
+static void become_daemon(int foreground)
 {
   FILE *pidfp;
   pid_t pid;
 <at>  <at>  -1153,7 +1153,7  <at>  <at> 
   chdir("/");

   /* Detach from foreground process */
-  if ( !submount ) {
+  if ( !submount && !foreground) {
     pid = fork();
     if ( pid > 0 )
       exit(0);
 <at>  <at>  -1248,6 +1248,7  <at>  <at> 
(Continue reading)

Vincent Danen | 4 Oct 2004 21:01

Re: supervising autofs (was Re: kdm not working in run script - SOLVED!!)


On 3-Oct-04, at 11:05 AM, Charlie Brady wrote:

>
> On Sat, 2 Oct 2004, Vincent Danen wrote:
>
>> Annvix uses runit... I'm not aware of any others that do, but Annvix
>> uses it completely out of the box.  The only service that is not run
>> under runit is autofs, which I still have to figure out.
>
> I think this patch (untested) will give you the -f option you need:

Yeah, you sent me that a while ago (and I still have to try it although 
now I'm trying to nail down some mysql and ldap issues).  I really need 
to get this applied and try to convert a really nasty initscript to a 
run script (this patch is likely the easiest part).

> --- autofs-4.0.0pre10/daemon/automount.c.orig	2004-08-22 
> 19:40:30.000000000 -0400
> +++ autofs-4.0.0pre10/daemon/automount.c	2004-08-22 20:03:44.000000000 
> -0400
>  <at>  <at>  -1143,7 +1143,7  <at>  <at> 
>    return -1;
>  }
>
> -static void become_daemon(void)
> +static void become_daemon(int foreground)
>  {
>    FILE *pidfp;
>    pid_t pid;
(Continue reading)


Gmane