LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-23-2004, 02:15 PM   #1
PowerMatt
Member
 
Registered: Aug 2004
Posts: 42

Rep: Reputation: 15
lcdproc, fedora core 2, and init scripts


I'm having a problem with the LCDd daemon failing to return it's status when it starts using the init script. It hangs Fedora duing boot because it never tells it that it has started. It just shows "Starting up LCDd" but the green OK never appears. However, LCDd does actually start. The display shows the "no clients" screen that appears when the daemon is running, but no client is. It can be stopped with no issues. I'd post the full init script, but the "no URL's for five posts" thing is preventing me (despite having removed all the URL's from the script).

Code:
start() {
	echo -n "Starting up LCDd: "
	daemon ${LCDd} -c ${configfile}
	RETVAL=$?
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/LCDd
	echo
}
 
Old 08-25-2004, 11:25 AM   #2
PowerMatt
Member
 
Registered: Aug 2004
Posts: 42

Original Poster
Rep: Reputation: 15
I would really appreciate some help with this. I haven't figured anything out in the two days since I posted this...
 
Old 09-03-2004, 11:44 AM   #3
PowerMatt
Member
 
Registered: Aug 2004
Posts: 42

Original Poster
Rep: Reputation: 15
Almost two weeks and no responses. I guess I stumped the linuxquestions.org community. I'm not any closer to figuring this out myself, either. The guy who develops lcdproc doesn't seem to pay any attention to his sourceforge page, as my support request there has also gone unanswered for the past two weeks.
 
Old 09-05-2004, 07:52 AM   #4
Ogi
Member
 
Registered: Jun 2004
Location: Belgrade
Distribution: Anything with a bash prompt :P
Posts: 74

Rep: Reputation: 15
Sorry i never saw this message, but then i havent been on the forums for a while

LCDd (from what i gather) is not designed to be run as a daemon and as such does not give the necessairy return status to the script, i remember reading somewhere how to make it work but i cannot remember now, i have generally adopted a slightly different way of doing it:

I managed to run LCDd at boot time on my server just by adding "nohup" and "&" between the LCDd command.

in your case that would be something like:

Quote:
nohup ${LCDd} -c ${configfile} &
as you can see i do not run LCDd as a daemon, but rather with the nohup command, that way my distro (debian) doesnt wait for the return status, it just executes it as a background process and continues, ignoring any output (the output is dumped into nohup.out), crude, but functional.

as such if you load any clients straight away in your script after you start LCDd (using my method), make sure you add the Sleep command after it (i use "sleep 2"). becuase as my script does not wait for LCDd to return its status it will execute the lcdproc client before the LCD is initialised properly, resulting in a garbled display.

my script is much less fancy:

Quote:
nohup /usr/local/lcdproc/sbin/LCDd -c ../LCDd.conf &
sleep 2
nohup netlcdclient -i eth0 -t -u bit &

but it works and everything starts up during boot just fine.

hope its of some help.

Last edited by Ogi; 09-05-2004 at 11:21 AM.
 
Old 09-05-2004, 10:45 AM   #5
PowerMatt
Member
 
Registered: Aug 2004
Posts: 42

Original Poster
Rep: Reputation: 15
Thanks! It works. Like you said, it's not pretty, but it gets the job done. One odd problem is that the display tends to stay blank after lcdproc starts for about 30 seconds, and then it goes back to normal. Not a major problem, just a bit of an annoyance.
 
Old 09-05-2004, 11:13 AM   #6
Ogi
Member
 
Registered: Jun 2004
Location: Belgrade
Distribution: Anything with a bash prompt :P
Posts: 74

Rep: Reputation: 15
well i cant say what the problem is (as i never had it, the only delay i have is the 2 seconds i set in sleep), it may be distro/configuration/hardware specific. perhaps it has to do with the sleep command (if you are using it). either way im happy you got it working and im sure a bit of configuration tweaking might sort out the delay.

Last edited by Ogi; 09-05-2004 at 11:48 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New init scripts? xconspirisist Fedora 9 12-09-2004 11:41 AM
2.6.7-1.469 fails to start init on Fedora Core 1 TheOneKEA Linux - Software 2 07-07-2004 02:33 PM
Fedora Core 2 Install "attempted to kill init" kernel panic STuPiDiCuS Fedora - Installation 1 06-21-2004 03:41 PM
Fedora Core 2 Kernel Panic: Attempt to kill init! ghg_legat0 Fedora 0 05-25-2004 10:31 AM
Scripts in /etc/rc.d/init.d correro Linux - General 1 03-13-2003 09:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration