Alexandre Rostovtsev posted on Mon, 06 Feb 2012 21:33:39 -0500 as excerpted:
> On Mon, 2012-02-06 at 19:41 -0600, William Hubbs wrote: >> > My counterproposal is to (a) fix init scripts for Category 2 so that >> > instead of "use net" or "need net", they only "use net.lo" or "need >> > net.lo"; and >> >> I think it would be better if I provided another service these scripts >> could use|need, because the loopback goes by at least one name other >> than "lo" that I know of, and that is "lo0", so if I don't provide a >> service, all of these scripts would have to conditionally use or need >> at least lo or lo0 depending on which platform they are running on. > > Maybe a virtual service called "lo", provided by net.lo and net.lo0? > >> For the normal use case, I submit that category one should not care >> about the loopback interface, since we don't make remote connections >> that way. That would mean that loopback would not provide net by >> default. > > Yes, that certainly seems reasonable. Indeed. I've long wondered why the loopback was thrown in there with all the others. It seems to me that a lo or loopback service for it, instead of net, would be more natural. Then have the individual net.* interface services and a common net service that by default includes all the net.* services EXCEPT loopback. Then have a configuration option such that individual installations can define what individual interface services compose net and how many of them must be up for net to be defined as up. Finally, make it possible to define additional virtual net services, net1, net2... each of which can be similarly locally configured as composed of several individual interface services, with each one allowed to set how many of its group of components must be up for it to be up. That would allow maximum configuration flexibility, with the ability to depend on one or a group of individual interface services, with each group allowed to require one of its set, all of its set, or something in between. Of course, one could add the loopback interface service to the definition of one of these groups if desired, but only the first one (net) would be defined by default, and it would by default include all interfaces /but/ loopback and would be provided when the first included interface came up. That would allow its definition to remain "fuzzily specified" so things could just depend on it by default if they needed an external network (ntpclient), or on loopback by default if they needed only a local interface to come up, even if they weren't a lot of use without an external network (privoxy, named). Where people want something up only if a specific net-service (or services, or one of several specific net-services) is up, they'll have to configure it specifically, just as they do now. There's no way around that since there's no simple way to determine that specific net-service in advance, but that would fix the problems for the first two categories at least, since there'd be a distinction between loopback and general net interface services. FWIW, my current config has net provided by loopback and several services depending on it, while ntpclient and ntpd depend on net.eth0. If the above defaults were implemented, that would have all "just worked", since my setup isn't complex enough to have multiple external network interface services to worry about, and stuff like privoxy could be configured by gentoo to depend on loopback only, while ntpclient depends on net, which if not including loopback would allow it to "just work" as well. I wouldn't have had to manually configure net.eth0, as I did due to lack of that distinction. -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman