LinHES Forums
http://forums.linhes.org/

Where To Put Boot Commands?
http://forums.linhes.org/viewtopic.php?f=25&t=22821
Page 1 of 1

Author:  sparks [ Tue Oct 09, 2012 8:56 pm ]
Post subject:  Where To Put Boot Commands?

One of the problems I have had since the switch from knoppmyth to linhes is where to put boot options. It is one of the reasons I tried mythbuntu for a year and a half. I'm back to LinHES but it's time to get the answer.

LinHES is different from regular arch linux boot. rc.conf is ignored so I can't add anything to the daemon list in the script. rc.multi, and therefore rc.local, seem to also be ignored. I have added things to /etc/runit/1.local but that executes earlier than I like. Adding things to sv seems like overkill plus some things I don't want sv to monitor. What do I do? rc.local would be perfect if it executed.

s

Author:  nbdwt73 [ Wed Oct 10, 2012 5:06 am ]
Post subject:  Re: Where To Put Boot Commands?

Put your startup commands in /runit/1.local

Author:  sparks [ Wed Oct 10, 2012 7:01 am ]
Post subject:  Re: Where To Put Boot Commands?

sparks wrote:
I have added things to /etc/runit/1.local but that executes earlier than I like.


1.local executes before the runit daemons. I would like something at the end of booting.

s

Author:  jams [ Wed Oct 10, 2012 7:22 am ]
Post subject:  Re: Where To Put Boot Commands?

In this case adding it to runit as a service is the only option.
If you only want something to run once, take a look at the runit unit for alsa-utils.

Author:  sparks [ Wed Oct 10, 2012 9:51 am ]
Post subject:  Re: Where To Put Boot Commands?

I kind of like that. But (programmers are a stubborn bunch, aren't we? :wink: ) I took the rc.local code from rc.multi

Code:
if [[ -x /etc/rc.local ]]; then
   /etc/rc.local
fi


and added it to the bottom of rc.sysinit. It works. The downside, of course, is that if the rc.sysinit gets updated, it breaks my mod until I re-edit rc.sysinit. I probably will try the runsv mod later. Thanks for the tip. I always wondered how those daemon scripts in /etc/rc.d got executed. LinHES is the only box in the house that uses the runsv system so I have never gotten very familiar with it.

s

Author:  jams [ Wed Oct 10, 2012 10:04 am ]
Post subject:  Re: Where To Put Boot Commands?

Well if it works for you thats what matters.

For reference with your mod, rc.local will be called before 1.local.
Take a look at /etc/runit/1 for verification.

Author:  sparks [ Thu Oct 11, 2012 4:02 pm ]
Post subject:  Re: Where To Put Boot Commands?

The daemons I wanted to run are now using runsv as you suggested. I tried doing it before but didn't get good results. Using the example you cited, it works like a charm. The basic command I need to run is a mount command. My external USB drive was not mounting consistently at boot. I made it noauto in fstab and then precede the mount command rc.local with a sleep to get the delay I want. rc.local runs as a fork (using &) so it doen't hang the boot process. Yeah, one stupid hack leads to another. :roll:

I decided that it was too much so I moved the mount to 1.local to make the change more robust and easier. Time will tell if this works but it's been much joy so far.

Thanks for the help. runsv makes my head spin.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/