Subject: Re: Faster boot - Delaying rc.conf services - crontab@reboot
To: C. K. <ck74@operamail.com>
From: Johnny Billquist <bqt@softjar.se>
List: netbsd-users
Date: 08/12/2007 03:54:00
C. K. skrev:
>
>
> Giles Lean-2 wrote:
>>
>> o turn them off in /etc/rc.conf and start them manually later?
>>
>> o reorder the startup scripts so that the service(s) you want
>> start earlier?
>>
>> o use a different startup process such as launchd[1] or
>> daemontools[2] to control these services?
>>
>> o determine which of the services is/are slow starting up, and
>> fix them (surely sshd and lpd are fast to start?)
>>
>> (I'd wonder what the slowness is: shortage of CPU resources,
>> or are the services being held up e.g. by slow DNS?)
>>
>>> Any advise other than compiling kernel? Boot untill dhclient
>>> service starts is only 22 secs and that's acceptable.
>> I don't see how compiling a new kernel is relevant; the kernel
>> finishes booting before any of the rc scripts run.
>>
>> Giles
>>
>> [1] http://launchd.macosforge.org/
>> [2] http://cr.yp.to/daemontools.html
>>
>>
>
>
> OK, i think i've found a suitable solution:
>
> rc.conf >
> ---------------
> apache=NO
> mysqld=NO
>
>
> crontab -e >
> --------------------
> @reboot /etc/script.to.call
>
>
> /etc/script.to.call >
> --------------------
> sleep 120
> /etc.rc.d/apache start
> /etc/rc.d/mysqld start
Yeah, that should also do it.
You might need to fiddle a little bit more, since /etc/rc.d/apache start won't
start apache if you have apache=NO in your rc.conf.
I think you need something like forcestart as an argument. Or maybe you can
override the apache variable on the command line. I haven't really explored this.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol