View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 6 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Wed Nov 02, 2005 1:20 pm 
Offline
Joined: Mon Aug 29, 2005 11:29 am
Posts: 15
I've been searching the net for a solution to this problem, but in vain. Hopefully someone can help me here.
I want to acheive two things:
- start all LUN:s on SCSI during bootup. I've tried to send an option to LILO as suggested in a forum, but it doesn't work for me for some reason. I do not want to recompile the kernel. I can get them started from CLI (using echo "scsi add-single-device..." > /proc/scsi/scsi") But when I try to do that in bootmisc.sh or local (in /etc/init.d) it doesn't work.
- start lirc late in the boot process, since when I try to start it the default way, it doesn't work (my remote is connected to /dev/bus/input/event? and the event? changes from one boot to the next, so I have to read it dynamically and it obviously has to be done late during booting). And the same thing applies here, it has to be done as root. I've tried using bootmisc.sh and local here too. Doesn't work :cry: ...
So, anyone, how do I run commands as root during booting?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 4:14 pm 
Offline
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location: Nashville, TN
search the forums here and over on the wiki for sudo, once that is setup properly then you should be able to run things as root from a script. though I thought that bootmisc ran with root privileges, though I could be completely wrong on that account.

_________________
Have a question search the forum and have a look at the KnoppMythWiki.

Xsecrets


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 5:01 pm 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
I thought bootmisc ran as root too, but I think what he is saying is that the event? thing has not been set up by the time bootmisc runs.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 03, 2005 2:15 pm 
Offline
Joined: Mon Aug 29, 2005 11:29 am
Posts: 15
No, bootmisc can't be running as root, at least I can't write to /proc/scsi/scsi from bootmisc, nor can I run /etc/init.d/lirc.
I've tried sudo, but it didn't work. I'll look through the wiki again, to see how I set it up.
Btw, what I mean is that "the event? thing" isn't set up when I try to run my script from inside "lirc start" during the "ordinary" booting (in rc.d and rcS).


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2005 12:04 pm 
Offline
Joined: Mon Aug 29, 2005 11:29 am
Posts: 15
OK, I've got sudo and sudoers right, so I can run 'sudo /etc/init.d lirc' from bootmisc.sh. Unfortunately that doesn't help me :cry: . lirc is still started with wrong /dev/input/event? (and the error logs gets written full with errors until I stop lirc).
My next step is trying to start lirc in KnoppMyth-run, just before the frontend is started.
I feel it to be a kludge, but what is a poor man to do? ;-) And I don't know if it works.
Could the problem with lirc being assigned wrong /dev/input/event? be that dvb-usb is initializing the AVerMedia USB device two times? If the second initializing is done after the boot process is ready, the device could get another /dev/input/event? than the one used during booting (and that's why lirc gets the wrong /dev/input/event-number).
If so, why initialize the USB device twice? And could the second initializing (if it's necessary) be done before booting is ready - or at least before bootmisc.sh is run?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 19, 2005 10:44 am 
Offline
Joined: Mon Aug 29, 2005 11:29 am
Posts: 15
Finally, it works! The trick was to put 'sudo /etc/init.d/lirc start' in ~./fluxbox/apps as [startup]{sudo...}, just before the startup of KnoppMyth-run.


Top
 Profile  
 

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


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 10 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:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu