4 ms·
Actually, if you use efficient software, you can get lots of stuff running in basically no time. In particular that means avoiding shell scripts and using as li
by ambrop7 13y ago
Actually, if you use efficient software, you can get lots of stuff running in basically no time. In particular that means avoiding shell scripts and using as little external commands as possible.
In fact, I'm pretty sure that if the author stopped using OpenRC and used systemd instead, to initialize the same things, it would have made a noticable difference.
And a little self-promotion now :P As far as network config is concerned, using my NCD[1] software, it can be set up in no time (that is, not much more than the time it takes to negotiate a DHCP lease). In fact if you were super crazy, you would drop systemd and just run NCD as init, doing both basic initialization, as well as network config, all in one NCD process. I've even tried it some time ago, and got some very basic stuff working[2].
[1] https://code.google.com/p/badvpn/wiki/NCD https://code.google.com/p/badvpn/wiki/NCD
[2] https://code.google.com/p/ncdinit/ https://code.google.com/p/ncdinit/
- hmottestad 13y agoRecommend you have a look at how Apple does DHCP negotiations. http://cafbit.com/entry/rapid_dhcp_or_how_do http://cafbit.com/entry/rapid_dhcp_or_how_do
- ambrop7 13y agoThanks for the link, that is some interesting info. I've only skimmed it, but yes, I'm aware that DHCP requests can be made without a discover phase (I've had to read the RFC to implement DHCP in NCD ;). I suspect that it's not actually directly doing some low-level ARP magic; rather the DHCP client may just be sending multiple DHCP request packets to past DHCP servers, and only the one whose automatic ARP request succeeds actually gets sent out. At least that'd how I would implement it.
- aidenn0 13y agoI actually experimented with a kvm image of gentoo where I replaced openrc with daemontools (plus some sh scripts I wrote to manage dependencies). I boot to a login with DHCP and NIS in under 5 seconds.