<?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>110572</bug_id>
          
          <creation_ts>2005-10-26 14:07 0000</creation_ts>
          <short_desc>app-laptop/i8kutils - i8k init.d script fails to daemonize i8kmon</short_desc>
          <delta_ts>2006-10-01 17:59:42 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>Applications</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>xenos@xenos-1.net</reporter>
          <assigned_to>tester@gentoo.org</assigned_to>
          <cc>sebroeder@gmail.com</cc>
    
    <cc>toby.smithe@gmail.com</cc>

      

      
          <long_desc isprivate="0">
            <who>xenos@xenos-1.net</who>
            <bug_when>2005-10-26 14:07:33 0000</bug_when>
            <thetext>When the /etc/init.d/i8k script runs to start i8kbuttons and i8kmon, i8kmon
fails to load.

Reproducible: Always
Steps to Reproduce:
1.emerge i8kutils
2./etc/init.d/i8k start

Actual Results:  
 * Starting i8kbuttons ...                                                     
                                                           [ ok ]
 * Starting i8kmon ...                                                         
                                      [ !! ]


Expected Results:  
 * Starting i8kbuttons ...                                                     
                                      [ ok ]
 * Starting i8kmon ...                                                         
                                      [ ok ]


The solution seems simple enough. Could someone implement it?

30,31c30,31
&lt;                       --make-pidfile --exec /usr/bin/i8kmon --background \
&lt;                       -- -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT}
---
&gt;                       --make-pidfile --exec /usr/bin/tclsh --background \
&gt;                       -- /usr/bin/i8kmon -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT}</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>xenos@xenos-1.net</who>
            <bug_when>2005-10-26 14:11:01 0000</bug_when>
            <thetext>(In reply to comment #0)
&gt; When the /etc/init.d/i8k script runs to start i8kbuttons and i8kmon, i8kmon
&gt; fails to load.
&gt; 
&gt; Reproducible: Always
&gt; Steps to Reproduce:
&gt; 1.emerge i8kutils
&gt; 2./etc/init.d/i8k start
&gt; 
&gt; Actual Results:  
&gt;  * Starting i8kbuttons ...                                                     
&gt;                                                            [ ok ]
&gt;  * Starting i8kmon ...                                                         
&gt;                                       [ !! ]
&gt; 
&gt; 
&gt; Expected Results:  
&gt;  * Starting i8kbuttons ...                                                     
&gt;                                       [ ok ]
&gt;  * Starting i8kmon ...                                                         
&gt;                                       [ ok ]
&gt; 
&gt; 
&gt; The solution seems simple enough. Could someone implement it?
&gt; 
&gt; 30,31c30,31
&gt; &lt;                       --make-pidfile --exec /usr/bin/i8kmon --background \
&gt; &lt;                       -- -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT}
&gt; ---
&gt; &gt;                       --make-pidfile --exec /usr/bin/tclsh --background \
&gt; &gt;                       -- /usr/bin/i8kmon -d ${NOAUTO:+-na} ${TIMEOUT:+-t
$TIMEOUT}



sorry, that&apos;s the diff between the broken /etc/init.d/i8k script and my working
version.

Conor</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>xenos@xenos-1.net</who>
            <bug_when>2005-11-22 15:29:19 0000</bug_when>
            <thetext>(In reply to comment #0)
&gt; When the /etc/init.d/i8k script runs to start i8kbuttons and i8kmon, i8kmon
&gt; fails to load.
&gt; Reproducible: Always
&gt; Steps to Reproduce:
&gt; 1.emerge i8kutils
&gt; 2./etc/init.d/i8k start
&gt; Actual Results:  
&gt;  * Starting 
i8kbuttons ...                                                     
&gt;                                                            [ ok ]
&gt;  * Starting 
i8kmon ...                                                         
&gt;                                       [ !! ]
&gt; Expected Results:  
&gt;  * Starting 
i8kbuttons ...                                                     
&gt;                                       [ ok ]
&gt;  * Starting 
i8kmon ...                                                         
&gt;                                       [ ok ]
&gt; The solution seems simple enough. Could someone implement it?
&gt; 30,31c30,31
&gt; &lt;                       --make-pidfile --exec /usr/bin/i8kmon --background \
&gt; &lt;                       -- -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT}
&gt; ---
&gt; &gt;                       --make-pidfile --exec /usr/bin/tclsh --background \
&gt; &gt;                       -- /usr/bin/i8kmon -d ${NOAUTO:+-na} ${TIMEOUT:+-t 
$TIMEOUT}

I would like to see this little problem fixed. What is involved in becoming a 
package maintainer? Who do I need to speak with? It&apos;s not like this is a huge 
bug.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>azote@slinux.net</who>
            <bug_when>2005-12-17 19:23:49 0000</bug_when>
            <thetext>(In reply to comment #2)
this last one  works for me ....</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tester@gentoo.org</who>
            <bug_when>2006-01-05 20:39:14 0000</bug_when>
            <thetext>taking over this package. I&apos;ll try to look at this problem this weekend</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>xenos@xenos-1.net</who>
            <bug_when>2006-01-06 04:11:24 0000</bug_when>
            <thetext>(In reply to comment #4)
&gt; taking over this package. I&apos;ll try to look at this problem this weekend
&gt; 

Awesome! Thank you.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sebroeder@gmail.com</who>
            <bug_when>2006-01-09 14:12:00 0000</bug_when>
            <thetext>The tclsh patch works for me too, but I realized that the modified init script needs tcl to be installed (wiped it out incidently by emerge -depclean).

So we should add a tcl dependency to the ebuild or find another approach to solve the pid problem.

Regards, Sebastian</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tester@gentoo.org</who>
            <bug_when>2006-01-15 09:13:33 0000</bug_when>
            <thetext>strange, the current script seems to work fine here. 
Are you usin i8kutils 1.25? Which version of baselayout ?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sebroeder@gmail.com</who>
            <bug_when>2006-04-19 07:37:07 0000</bug_when>
            <thetext>I use the ~x86 baselayout (1.23.0_pre17-r2). Not sure if it works atm, have to sort some things out first. Strange however is that /usr/bin/i8kmon is not installed anymore by the ebuild. Is this intended?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>toby.smithe@gmail.com</who>
            <bug_when>2006-09-01 06:45:12 0000</bug_when>
            <thetext>OK. It&apos;s not installed any more by default as it depends on the USE flag &quot;tk&quot;, as it can be run in a GUI mode.

I am surprised that it hasn&apos;t been fixed yet, with such a simple patch to be applied.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>xenos@xenos-1.net</who>
            <bug_when>2006-09-08 04:26:36 0000</bug_when>
            <thetext>(In reply to comment #7)
&gt; strange, the current script seems to work fine here. 
&gt; Are you usin i8kutils 1.25? Which version of baselayout ?
&gt; 

I&apos;m using the following:

# emerge -p baselayout i8kutils

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-apps/baselayout-1.12.4-r6
[ebuild   R   ] app-laptop/i8kutils-1.25

To this day I still have to modify the init script to get i8kmon to daemonize.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rogerx@sdf.lonestar.org</who>
            <bug_when>2006-09-26 19:48:11 0000</bug_when>
            <thetext>Can we please add an einfo (or echo) at the end of the package build stating, &quot;i8kmon will only be built if the tk flag is enabled.  Without i8kmon, the daemon will not be able to control the fans (with /etc/i8kmon.conf)&quot;?

Or, maybe have /etc/init.d/i8k* notify in syslog &quot;i8kmon was not found, rebuild i8kutils with the tk to build this binary&quot;?
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rogerx@sdf.lonestar.org</who>
            <bug_when>2006-09-27 04:00:44 0000</bug_when>
            <thetext>I have fixed the i8kmon within /etc/init.d/i8kmon.  Before, it would always fail starting because the i8kmon bin file forks to a tclsh process and does not truely run in the background.  

                ebegin &quot;Starting i8kmon&quot;
                start-stop-daemon -b --start --quiet --name &quot;tclsh /usr/bin/i8kmon&quot; \
                        --exec /usr/bin/i8kmon \
                        -- -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT}
                eend $?

1) For some reason, &quot;--background&quot; was not fully working.  So I switched to the short term &quot;-b&quot; and moved it forward in the start-stop-daemon function.

2) Used &quot;--name&quot; to check for the process name instead.  I belive I can do --name &quot;tclsh i8kmon&quot; to more accurately filter /proc names, as you can see, i&apos;ve implemented it within the stop function


ebegin &quot;Stopping i8kmon&quot;
start-stop-daemon --stop --quiet --name &quot;tclsh /usr/bin/i8kmon&quot;
eend $?

1) Again, I removed the make-pid stuff as, again, i8kmon forks to another process and I am just checking for the simple name of &quot;tclsh /usr/bin/i8kmon&quot;.


Ok. retested.  Ask if you want a diff.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tester@gentoo.org</who>
            <bug_when>2006-10-01 17:59:42 0000</bug_when>
            <thetext>after a long long time.. I&apos;ve applied the fixes from comment #12</thetext>
          </long_desc>
      
    </bug>

</bugzilla>