LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 07-05-2006, 05:00 PM   #1
Maverick1182
Member
 
Registered: Aug 2004
Location: London
Distribution: Gentoo
Posts: 277

Rep: Reputation: 30
Cant run command at bootup


Hi, i'm trying to run the lircd deamon at bootup and from the suggestions on the forums i've added it to /etc/rc.d/rc.local file as below , but it doesnt seem to load. any clues? i normally have to login as root to run the command could this be a problem? they run when i type them in a console manually.

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.



touch /var/lock/subsys/local
modprobe lirc_dev
modprobe lirc_gpio
lircd --device /dev/lirc0
 
Old 07-05-2006, 11:40 PM   #2
patrokov
Member
 
Registered: Jan 2006
Location: Riviera Beach
Distribution: Slackware -current, ArchLinux
Posts: 59

Rep: Reputation: 15
What comes to mind is that you should try using the absolute path to the commands because your environment paths may not be setup when rc.local runs.
Code:
/bin/touch /var/lock/subsys/local
/sbin/modprobe lirc_dev
/sbin/modprobe lirc_gpio
/$path/lircd --device /dev/lirc0
 
Old 07-08-2006, 03:42 AM   #3
Maverick1182
Member
 
Registered: Aug 2004
Location: London
Distribution: Gentoo
Posts: 277

Original Poster
Rep: Reputation: 30
Tried the solution, but the daemon still doesnt load
 
Old 07-08-2006, 04:20 AM   #4
spirit receiver
Member
 
Registered: May 2006
Location: Frankfurt, Germany
Distribution: SUSE 10.2
Posts: 424

Rep: Reputation: 33
Try and replace rc.local with the following file temporarily:
Code:
#! /bin/bash -x
exec > >(mail -s "from rc.local" root) 2>&1
touch /var/lock/subsys/local
modprobe lirc_dev
modprobe lirc_gpio
lircd --device /dev/lirc0
It should send an email to root that will tell you what's going on. I believe that sending an email should not be a problem in rc.local, but if I'm wrong, you can replace the exec line with the following:
Code:
exec >FILENAME 2>&1
Then the output will go to the specified file.
 
  


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
few utilities run automatically after a bootup. keen4linux Linux - Newbie 1 02-28-2006 06:20 AM
Getting Apache to run on bootup tumana Linux - Software 3 10-12-2004 03:03 PM
re-run DHCP after bootup? azwr Linux - Wireless Networking 3 06-19-2004 11:13 AM
Auto run at bootup irfan44 Linux - Software 6 05-21-2004 08:44 AM
How do i make scripts run at bootup and shutdown? BajaNick Linux - General 2 08-11-2003 08:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 05:26 AM.

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