View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 12 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Wed Mar 31, 2010 11:29 am 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
I want to install ncid so I can have caller ID displayed on the tv while watching Myth recordings. So to get the procedure down, I installed plain Arch on a test machine. No myth stuff, just Arch. I downloaded the ncid source and did the make and make install (actually for Arch I used "make package" and "make package-install" as per instructions in the makefile).

I got the ncid server working and to have the daemon start on boot I added "ncidd" in the daemons section in rc.conf as per the Arch wiki. Works fine and starts up on boot.

Then I went to my test linhes (6.02) machine and did the same thing (make and make install). I can start the daemon manually by just typing ncidd at the command line and it works. But putting it in the daemons section of rc.conf does not work. It doesn't start on boot.

There isn't much in the daemons section of rc.conf on LinHes. It seems daemons are started some other way.

So my question is, why doesn't what works on Arch not work in 6.02? And how can I get the daemons to start on boot in 6.02? Am I missing something obvious or does it get complicated from here on in?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 31, 2010 11:54 am 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
LinHES uses runit instead of sysv init. See http://linhes.org/bugs/projects/linhes/ ... n-Settings


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2010 9:49 am 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
Thanks for the pointer!
I created the service directory /etc/sv/ncidd and put an executable run file in it:
Code:
#!/bin/sh
exec 2>&1
export TERM=linux
. /etc/rc.conf
. /etc/rc.d/functions

stat_runit "Starting CallerID"
   
exec /usr/sbin/ncidd 2>&1
Then I added the service:
Code:
# add_service.sh ncidd
Then I started the service with sv and this is what I get:
Code:
# sv start ncidd
timeout: down: ncidd: 1s, normally up, want up
#
I'm not sure how to debug this. Starting the daemon from the command line works.
Code:
#ncidd


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2010 10:11 am 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
From the runit website:
Quote:
Note that for the use with runit, service daemons must not put themself into the background, but must run in the foreground.
Perhaps this is the problem? I think ncidd puts itself into the background when it executes, because the command prompt returns when executing it from the command line.

Looking at the ncidd docs, there is no command line argument for disabling running in the background.

Is there an alternate method to get this daemon running at boot time with LinHes without using runit?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2010 11:30 am 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
Did you try using the debug (-D) option? That may keep it in the foreground. If it doesn't you could start it from /etc/runit/1.local

Also, if you get this working please add how you did it to the Wiki: http://linhes.org/bugs/projects/linhes/ ... eat_things

Britney


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2010 11:35 am 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
jzigmyth wrote:
From the runit website:
Quote:
Note that for the use with runit, service daemons must not put themself into the background, but must run in the foreground.
Perhaps this is the problem?


Probably. Is there a "debug" option? That sometimes keeps the app in the foreground.

Quote:
Is there an alternate method to get this daemon running at boot time with LinHes without using runit?


If there is no debug option I have an idea . . . maybe.

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2010 12:32 pm 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
Yes, there is a debug ( -D) option, and yes, that does seem to keep it in the foreground. However, I still get the same timeout error from sv start.

On the brighter side, putting it in /etc/runit/1.local does work! But don't put it there with the debug option turned on. That locked up the boot process!

There must be something wrong with my sv run script. I just kludged it from looking at other scripts. I don't really know what everything in there does.

Any ideas on how to start it with runit's sv command are welcome. For now it's working from /etc/runit/1.local so I'll continue along that path to see if I can get it all working on my test machine.

Thanks, again!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2010 1:16 pm 
Offline
Joined: Thu Apr 03, 2008 11:42 pm
Posts: 114
Location: Calgary, Canada
If you can't find a way to make the daemon run in the foreground, you can fake it by scripting a wait in the run script. Search for my MythExport how-to post for an example.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2010 3:33 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
jzigmyth wrote:
There must be something wrong with my sv run script. I just kludged it from looking at other scripts. I don't really know what everything in there does.


Code:
cd /etc/sv/<servicename>
./run


Note that's <dot><slash>run (Hard to see)

What does it say? (If anything)

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2010 4:06 pm 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
mihanson wrote:
What does it say? (If anything)
Well, I'm embarrassed to admit it crashed out because I have windows line-feeds in the file! I was using webmin to cut and paste and edit files and somehow I introduced windows line-feeds into the run file.

After fixing the file, the daemon started properly through sv start. We're cooking with gas, now!

This looks very promising, I'll update the wiki as soon as I get the finishing touches on this.

Thanks Britney and Mihanson for your debugging help and Paulsid for your alternate solutions.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 03, 2010 7:27 am 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
brfransen wrote:
Also, if you get this working please add how you did it to the Wiki: http://linhes.org/bugs/projects/linhes/ ... eat_things
Well, it looks like I'm gonna need some help with the wiki, too! I went to the above link, and I can't see any way to start a new topic, or edit an old one for that matter.

I have worked on the knoppmyth wiki, but I can't figure out the LinHES wiki. I am signed in, but I don't see an "edit" button.
:?:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 03, 2010 11:29 am 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
jzigmyth, try it now.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu