<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>157589</bug_id>
          
          <creation_ts>2006-12-09 02:53 0000</creation_ts>
          <short_desc>sys-apps/baselayout-1.13.0_alpha8 starts use-d services as well as need-ed services</short_desc>
          <delta_ts>2006-12-09 07:39:26 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>baselayout</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>ikelos@gentoo.org</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>ikelos@gentoo.org</who>
            <bug_when>2006-12-09 02:53:33 0000</bug_when>
            <thetext>So I just upgraded this morning and spotted that baselayout seemed to be starting ypbind, nfsmount, mysql, postgres and slapd where previously it hadn&apos;t.  Many of these started just before fcron, so I double checked and it seems that they&apos;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&apos;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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>uberlord@gentoo.org</who>
            <bug_when>2006-12-09 03:19:22 0000</bug_when>
            <thetext>(In reply to comment #0)
&gt; So I just upgraded this morning and spotted that baselayout seemed to be
&gt; starting ypbind, nfsmount, mysql, postgres and slapd where previously it
&gt; hadn&apos;t.  Many of these started just before fcron, so I double checked and it
&gt; seems that they&apos;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&apos;s always done this, or meant to.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ikelos@gentoo.org</who>
            <bug_when>2006-12-09 03:33:12 0000</bug_when>
            <thetext>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 &quot;need&quot; B then start B whether it&apos;s in a runlevel or not.
if A &quot;use&quot; B then if B is in any runlevel we&apos;re using, start it before A
if A &quot;before&quot; B then if starting B and A, start A before B
and similarly for &quot;after&quot;

If the newly implemented semantics are &apos;if A &quot;use&quot; B then start B whether it&apos;s in a runlevel or not&apos;, then what does the &quot;need&quot; command achieve?  Also, how should initscripts specify a weak dependency on other initscripts (as in, if it&apos;s running I&apos;ll make use of it), is that all to be done by before and after?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ikelos@gentoo.org</who>
            <bug_when>2006-12-09 03:37:51 0000</bug_when>
            <thetext>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 &apos;use&apos; line,
      it must be added to the &apos;boot&apos; or current runlevel to be considered a
      valid &apos;use&apos; dependency.  It can also be used to determine startup order.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>uberlord@gentoo.org</who>
            <bug_when>2006-12-09 04:15:40 0000</bug_when>
            <thetext>Created an attachment (id=103678)
Fixes the issue

Must have had my head up my ass :/

Try this patch</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ikelos@gentoo.org</who>
            <bug_when>2006-12-09 04:24:52 0000</bug_when>
            <thetext>Sounds like a very undignified position from which to code so much good stuff.  5;)

That patches works like a treat, thanks!  5:)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ikelos@gentoo.org</who>
            <bug_when>2006-12-09 07:39:26 0000</bug_when>
            <thetext>Fixed by baselayout-1.13.0_alpha8-r1</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>103678</attachid>
            <date>2006-12-09 04:15 0000</date>
            <desc>Fixes the issue</desc>
            <filename>x</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IHNyYy9yYy1kZXBlbmQuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzcmMvcmMtZGVwZW5kLmMJKHJl
dmlzaW9uIDI0MDgpCisrKyBzcmMvcmMtZGVwZW5kLmMJKHdvcmtpbmcgY29weSkKQEAgLTU5Nyw3
ICs1OTcsNiBAQAogCQkgICAgewogCQkgICAgICBkaSA9IGdldF9kZXBpbmZvIChkZXB0cmVlLCBs
cC0+aXRlbSk7CiAJCSAgICAgIGlmIChkaSAmJiAoc3RyY21wICh0eXBlLT5pdGVtLCAiaW5lZWQi
KSA9PSAwIHx8Ci0JCQkJIHN0cmNtcCAodHlwZS0+aXRlbSwgIml1c2UiKSA9PSAwIHx8CiAJCQkJ
IHZhbGlkX3NlcnZpY2UgKGRpLT5zZXJ2aWNlKSkpCiAJCQl2aXNpdF9zZXJ2aWNlIChkZXB0cmVl
LCB0eXBlcywgc29ydGVkLCB2aXNpdGVkLCBkaSwKIAkJCQkgICAgICAgdHJ1ZSk7CkBAIC02MDYs
NyArNjA1LDYgQEAKIAkJfQogCSAgICAgIGVsc2UKIAkJaWYgKGRpICYmIChzdHJjbXAgKHR5cGUt
Pml0ZW0sICJpbmVlZCIpID09IDAgfHwKLQkJCSAgIHN0cmNtcCAodHlwZS0+aXRlbSwgIml1c2Ui
KSA9PSAwIHx8CiAJCQkgICB2YWxpZF9zZXJ2aWNlIChzZXJ2aWNlKSkpCiAJCSAgdmlzaXRfc2Vy
dmljZSAoZGVwdHJlZSwgdHlwZXMsIHNvcnRlZCwgdmlzaXRlZCwgZGksIHRydWUpOwogCSAgICB9
Cg==
</data>        

          </attachment>
    </bug>

</bugzilla>