[Bug 310] New: lfs-bootscripts-1.8

bugzilla at linuxfromscratch.org bugzilla at linuxfromscratch.org
Wed Mar 13 18:35:36 PST 2002


           Summary: lfs-bootscripts-1.8
           Product: Linux From Scratch
           Version: CVS
          Platform: PC
        OS/Version: Other
            Status: NEW
 Status Whiteboard:
          Severity: normal
          Priority: P3
         Component: Book
        AssignedTo: lfs-book at linuxfromscratch.org
        ReportedBy: gerard at linuxfromscratch.org

getpids function doesn't take "grandfather pid" into account:

From: Dirk Groeneveld <dirk.groeneveld at gmx.de>                                  
To: lfs-dev <lfs-dev at linuxfromscratch.org>                                      
Subject: bootscripts bug                                                        
Date: Thu, 14 Mar 2002 00:35:04 +0100                                           

I have found a problem with the bootscripts, and tinkered with them a           
little, but found no satisfying solution so far. I have tried version           
1.7. It's all very weird and I am very confused.                                
Apparently the script finds itself when it is called like the daemon it         
is meant to start. For example, I use /etc/rc.d/init.d/squid to start           
/usr/sbin/squid. The script starts up, looks for squid, finds itself,           
thinks, squid is already running, and aborts. That is very weird because        
I'd think that the -o %PPID parameter to pidof (in getpids() in                 
/etc/rc.d/init.d/functions) would filter out the script from the list of        
returned pids. So I added a "ps ax | grep squid" right after the pidof          
command, and had it print the return of getpids to the screen. It looks         
like this (newlines deliberately added to improve readability, he prints        
everything into one line):                                                      
Starting squid ...                                                              
1747 pts/2 S 0:00 /bin/sh ./squid start                                         
1750 pts/2 S 0:00 /bin/sh ./squid start                                         
1754 pts/2 S 0:00 grep squid                                                    
Already running     [ ATTN ]
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-book' in the subject header of the message

More information about the lfs-book mailing list