Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 110572 - app-laptop/i8kutils - i8k init.d script fails to daemonize i8kmon
Summary: app-laptop/i8kutils - i8k init.d script fails to daemonize i8kmon
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Olivier Crete (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-26 14:07 UTC by Conor Richard
Modified: 2006-10-01 17:59 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Conor Richard 2005-10-26 14:07:33 UTC
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
<                       --make-pidfile --exec /usr/bin/i8kmon --background \
<                       -- -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT}
---
>                       --make-pidfile --exec /usr/bin/tclsh --background \
>                       -- /usr/bin/i8kmon -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT}
Comment 1 Conor Richard 2005-10-26 14:11:01 UTC
(In reply to comment #0)
> 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
> <                       --make-pidfile --exec /usr/bin/i8kmon --background \
> <                       -- -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT}
> ---
> >                       --make-pidfile --exec /usr/bin/tclsh --background \
> >                       -- /usr/bin/i8kmon -d ${NOAUTO:+-na} ${TIMEOUT:+-t
$TIMEOUT}



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

Conor
Comment 2 Conor Richard 2005-11-22 15:29:19 UTC
(In reply to comment #0)
> 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
> <                       --make-pidfile --exec /usr/bin/i8kmon --background \
> <                       -- -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT}
> ---
> >                       --make-pidfile --exec /usr/bin/tclsh --background \
> >                       -- /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's not like this is a huge 
bug.
Comment 3 azote 2005-12-17 19:23:49 UTC
(In reply to comment #2)
this last one  works for me ....
Comment 4 Olivier Crete (RETIRED) gentoo-dev 2006-01-05 20:39:14 UTC
taking over this package. I'll try to look at this problem this weekend
Comment 5 Conor Richard 2006-01-06 04:11:24 UTC
(In reply to comment #4)
> taking over this package. I'll try to look at this problem this weekend
> 

Awesome! Thank you.
Comment 6 Sebastian Roeder 2006-01-09 14:12:00 UTC
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
Comment 7 Olivier Crete (RETIRED) gentoo-dev 2006-01-15 09:13:33 UTC
strange, the current script seems to work fine here. 
Are you usin i8kutils 1.25? Which version of baselayout ?
Comment 8 Sebastian Roeder 2006-04-19 07:37:07 UTC
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?
Comment 9 Toby Smithe 2006-09-01 06:45:12 UTC
OK. It's not installed any more by default as it depends on the USE flag "tk", as it can be run in a GUI mode.

I am surprised that it hasn't been fixed yet, with such a simple patch to be applied.
Comment 10 Conor Richard 2006-09-08 04:26:36 UTC
(In reply to comment #7)
> strange, the current script seems to work fine here. 
> Are you usin i8kutils 1.25? Which version of baselayout ?
> 

I'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.
Comment 11 Roger 2006-09-26 19:48:11 UTC
Can we please add an einfo (or echo) at the end of the package build stating, "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)"?

Or, maybe have /etc/init.d/i8k* notify in syslog "i8kmon was not found, rebuild i8kutils with the tk to build this binary"?
Comment 12 Roger 2006-09-27 04:00:44 UTC
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 "Starting i8kmon"
                start-stop-daemon -b --start --quiet --name "tclsh /usr/bin/i8kmon" \
                        --exec /usr/bin/i8kmon \
                        -- -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT}
                eend $?

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

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


ebegin "Stopping i8kmon"
start-stop-daemon --stop --quiet --name "tclsh /usr/bin/i8kmon"
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 "tclsh /usr/bin/i8kmon".


Ok. retested.  Ask if you want a diff.
Comment 13 Olivier Crete (RETIRED) gentoo-dev 2006-10-01 17:59:42 UTC
after a long long time.. I've applied the fixes from comment #12