Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 157589 - sys-apps/baselayout-1.13.0_alpha8 starts use-d services as well as need-ed services
Summary: sys-apps/baselayout-1.13.0_alpha8 starts use-d services as well as need-ed se...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-09 02:53 UTC by Mike Auty (RETIRED)
Modified: 2006-12-09 07:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixes the issue (x,685 bytes, patch)
2006-12-09 04:15 UTC, Roy Marples (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Auty (RETIRED) gentoo-dev 2006-12-09 02:53:33 UTC
So I just upgraded this morning and spotted that baselayout seemed to be starting ypbind, nfsmount, mysql, postgres and slapd where previously it hadn't.  Many of these started just before fcron, so I double checked and it seems that they're mentioned only in a use line (not in need lines).  I realize these are alpha versions, so no rush on a fix or anything, just figured it'd be worth reporting...  5:)

plasma init.d # grep -ir mysql * 
apache2:        use mysql dns logger netmount postgresql
fcron:  use logger slapd mysql postgresql
mysql: ...

plasma init.d # rc-update -s    
               acpid |      default                  
           alsasound | boot                          
            bootmisc | boot                          
             checkfs | boot                          
           checkroot | boot                          
               clock | boot                          
         consolefont | boot                          
               fcron |      default                  
                hald |      default                  
            hostname | boot                          
             keymaps | boot                          
         laptop_mode |      default                  
               local |      default nonetwork        
          localmount | boot                          
             metalog | boot                          
             modules | boot                          
              net.lo | boot                          
            netmount |      default                  
           rmnologin | boot                          
             urandom | boot                          
           vpnclient |      default                  
                 xdm |      default
Comment 1 Roy Marples (RETIRED) gentoo-dev 2006-12-09 03:19:22 UTC
(In reply to comment #0)
> So I just upgraded this morning and spotted that baselayout seemed to be
> starting ypbind, nfsmount, mysql, postgres and slapd where previously it
> hadn't.  Many of these started just before fcron, so I double checked and it
> seems that they're mentioned only in a use line (not in need lines).

If foo uses bar and neither are running and you start foo, then baselayout will start bar even if bar is not in the runlevel.

It's always done this, or meant to.
Comment 2 Mike Auty (RETIRED) gentoo-dev 2006-12-09 03:33:12 UTC
Hi, sorry for the misunderstanding then (although the new implementation will probably cause a pretty large upheaval in the way people are doing things).  I was always under the impression that:

if A "need" B then start B whether it's in a runlevel or not.
if A "use" B then if B is in any runlevel we're using, start it before A
if A "before" B then if starting B and A, start A before B
and similarly for "after"

If the newly implemented semantics are 'if A "use" B then start B whether it's in a runlevel or not', then what does the "need" command achieve?  Also, how should initscripts specify a weak dependency on other initscripts (as in, if it's running I'll make use of it), is that all to be done by before and after?
Comment 3 Mike Auty (RETIRED) gentoo-dev 2006-12-09 03:37:51 UTC
Also, you might want to update the documentation:

/etc/init.d/fcron help:

    use
      This can be seen as representing optional services this service depends on
      that are not critical for it to start.  For any service in the 'use' line,
      it must be added to the 'boot' or current runlevel to be considered a
      valid 'use' dependency.  It can also be used to determine startup order.
Comment 4 Roy Marples (RETIRED) gentoo-dev 2006-12-09 04:15:40 UTC
Created attachment 103678 [details, diff]
Fixes the issue

Must have had my head up my ass :/

Try this patch
Comment 5 Mike Auty (RETIRED) gentoo-dev 2006-12-09 04:24:52 UTC
Sounds like a very undignified position from which to code so much good stuff.  5;)

That patches works like a treat, thanks!  5:)
Comment 6 Mike Auty (RETIRED) gentoo-dev 2006-12-09 07:39:26 UTC
Fixed by baselayout-1.13.0_alpha8-r1