Re: init.d script dependencies for etch?
Scribit Humberto Massa dies 04/04/2005 hora 10:46: Cached? As in queried beforehand? As in two-pass algorithm, once iterating init.d with 'depends' as option, then with 'start' ? There are advantages to call the init.d script to poll its dependencies, instead of reading them: - the script can give them according to configuration files or by verifying that something is really needed (e.g. if a service is only accessed by unix sockets, no need for networking), - it doesn't force init.d scripts to be really shell scripts (dunno if this is really desirable, though). Dynamically, Nowhere man -- [EMAIL PROTECTED] OpenPGP 0xD9D50D8A signature.asc Description: Digital signature
Re: init.d script dependencies for etch?
Apparently Gentoo is using simpleinit. Anyone know what the other distros are using? -- Thomas Hood -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: init.d script dependencies for etch?
also sprach Humberto Massa [EMAIL PROTECTED] [2005.04.04.1546 +0200]: Cached? As in queried beforehand? As in two-pass algorithm, once iterating init.d with 'depends' as option, then with 'start' ? Yeah, that sounds nice. My sarcasm detector went off with this one, so I'll try to intervene. Actually, no sarcasm was intended. Sorry. It *does* sound interesting! A policy-based approach, so to speak... -- Please do not send copies of list mail to me; I read the list! .''`. martin f. krafft [EMAIL PROTECTED] : :' :proud Debian developer, admin, user, and author `. `'` `- Debian - when you have better things to do than fixing a system Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver! i doubt larry wall ever uses strict. -- frederick heckel signature.asc Description: Digital signature
Re: init.d script dependencies for etch?
martin f krafft wrote: also sprach Bastian Blank [EMAIL PROTECTED] [2005.04.01.2104 +0200]: Uh, this looks like a pull type of thing in which ever init.d script starts its dependencies. I don't think this is a good idea. No, it is not. The dependencies are cached. Cached? As in queried beforehand? As in two-pass algorithm, once iterating init.d with 'depends' as option, then with 'start' ? Yeah, that sounds nice. My sarcasm detector went off with this one, so I'll try to intervene. AFAIK the Gentoo /etc/rc does the following: 1. for all init.d scripts, read it, call depend(), determine its dependencies, store its start() function somewhere; 2. for all dependency-ordered determined, call the start() functions paralelizing when possible And, yes, it's very nice. HTH Massa -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: init.d script dependencies for etch?
[taking to devel, per your suggestion] also sprach Lars Wirzenius [EMAIL PROTECTED] [2005.04.01.1546 +0200]: I would like to work on making this happen for etch. I don't have an implementation yet, let alone a plan for how to do it, and I won't start work until after sarge is released, so this is just a heads-up for the release team. Excellent. Please keep me in the loop. You also surely want to be talking to hmh and miquels! Anyway, I am glad you are actively starting on this. I am going to actively work on policy-rc.d once sarge is out. Anyone who wants to tell me this is a really bad idea, or has suggestions on the implementation, I think we need to establish a header format policy, and I suggest something similar to debian/control, e.g. #!/bin/sh -e # init.d script for sshd # #% Depends: network, iptables # if $1 ... Then, using all the depends lines, you can make a call to a topographical sort implemenmtation at startup (should be quick enough as there are 100 init.d scripts) and parallelise the startups. Pretty standard CS stuff... I would prefer this over e.g. starting all init.d scripts at once and letting each call its dependencies. This would be very hard to implement efficiently. -- Please do not send copies of list mail to me; I read the list! .''`. martin f. krafft [EMAIL PROTECTED] : :' :proud Debian developer, admin, user, and author `. `'` `- Debian - when you have better things to do than fixing a system Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver! EARTH smog | bricks AIR -- mud -- FIRE soda water | tequila WATER signature.asc Description: Digital signature
Re: init.d script dependencies for etch?
martin f krafft [EMAIL PROTECTED] wrote: [taking to devel, per your suggestion] also sprach Lars Wirzenius [EMAIL PROTECTED] [2005.04.01.1546 +0200]: I would like to work on making this happen for etch. I don't have an implementation yet, let alone a plan for how to do it, and I won't start work until after sarge is released, so this is just a heads-up for the release team. [...] I think we need to establish a header format policy, and I suggest something similar to debian/control, e.g. #!/bin/sh -e # init.d script for sshd # #% Depends: network, iptables Very good to hear. This would also fix #253128 and similar problems. Regards, Frank -- Frank Küster Inst. f. Biochemie der Univ. Zürich Debian Developer
Re: init.d script dependencies for etch?
On Fri, 01 Apr 2005 16:50:20 +0200, martin f krafft wrote: I think we need to establish a header format policy, and I suggest something similar to debian/control, e.g. #!/bin/sh -e # init.d script for sshd # #% Depends: network, iptables # if $1 ... This has been standardized by LSB: http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html This is not to say that I like the idea of magic comment headers. I would prefer this over e.g. starting all init.d scripts at once and letting each call its dependencies. This would be very hard to implement efficiently. I missed the beginning of this conversation. I hope it has been said that the first thing we should do is investigate the several dependency-base init systems that are already out there. (There are earlier threads about this.) -- Thomas Hood -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: init.d script dependencies for etch?
On Fri, Apr 01, 2005 at 04:28:33PM +0200, martin f krafft wrote: I think we need to establish a header format policy, and I suggest something similar to debian/control, e.g. I must say, that the Gentoo-Way looks better than this. Bastian -- Vulcans believe peace should not depend on force. -- Amanda, Journey to Babel, stardate 3842.3 signature.asc Description: Digital signature
Re: init.d script dependencies for etch?
On Fri, Apr 01, 2005 at 08:16:58PM +0200, Bastian Blank wrote: On Fri, Apr 01, 2005 at 04:28:33PM +0200, martin f krafft wrote: I think we need to establish a header format policy, and I suggest something similar to debian/control, e.g. I must say, that the Gentoo-Way looks better than this. What is the Gentoo-Way? Wouter van Heyst -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: init.d script dependencies for etch?
On Fri, Apr 01, 2005 at 08:18:56PM +0200, Wouter van Heyst wrote: On Fri, Apr 01, 2005 at 08:16:58PM +0200, Bastian Blank wrote: I must say, that the Gentoo-Way looks better than this. What is the Gentoo-Way? | opts=depend checkconfig start stop reload | | depend() { | # Make networking dependency conditional on configuration | case $(sed 's/#.*//' /etc/syslog-ng/syslog-ng.conf) in | *source*tcp*|*source*udp*|*destination*tcp*|*destination*udp*) | need net ;; | esac | | need clock hostname | provide logger | } [...] | start() { [...] | } Bastian -- Immortality consists largely of boredom. -- Zefrem Cochrane, Metamorphosis, stardate 3219.8 signature.asc Description: Digital signature
Re: init.d script dependencies for etch?
also sprach Bastian Blank [EMAIL PROTECTED] [2005.04.01.2031 +0200]: | # Make networking dependency conditional on configuration | case $(sed 's/#.*//' /etc/syslog-ng/syslog-ng.conf) in | *source*tcp*|*source*udp*|*destination*tcp*|*destination*udp*) | need net ;; | esac | | need clock hostname | provide logger Uh, this looks like a pull type of thing in which ever init.d script starts its dependencies. I don't think this is a good idea. After all, the main reason why we want dependencies is to be able to parallelise the startup process. If we do that, we will run into locking problems trying to keep track which dependencies have been started and which not. Or we make other packages assume too much information about a given dependencies (e.g. by requiring a /bin/ps check). -- Please do not send copies of list mail to me; I read the list! .''`. martin f. krafft [EMAIL PROTECTED] : :' :proud Debian developer, admin, user, and author `. `'` `- Debian - when you have better things to do than fixing a system Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver! the difference between genius and stupidity is that genius has it's limits. -- albert einstein signature.asc Description: Digital signature
Re: init.d script dependencies for etch?
also sprach Thomas Hood [EMAIL PROTECTED] [2005.04.01.1930 +0200]: This has been standardized by LSB: http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html Clearly this is the way to go then. After all, we are striving to be LSB-compliant, so why deviate? -- Please do not send copies of list mail to me; I read the list! .''`. martin f. krafft [EMAIL PROTECTED] : :' :proud Debian developer, admin, user, and author `. `'` `- Debian - when you have better things to do than fixing a system Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver! micro$oft could shit in a box, and most people would buy it. signature.asc Description: Digital signature
Re: init.d script dependencies for etch?
On Fri, Apr 01, 2005 at 08:48:36PM +0200, martin f krafft wrote: Uh, this looks like a pull type of thing in which ever init.d script starts its dependencies. I don't think this is a good idea. No, it is not. The dependencies are cached. Bastian -- Get back to your stations! We're beaming down to the planet, sir. -- Kirk and Mr. Leslie, This Side of Paradise, stardate 3417.3 signature.asc Description: Digital signature
Re: init.d script dependencies for etch?
also sprach Bastian Blank [EMAIL PROTECTED] [2005.04.01.2104 +0200]: Uh, this looks like a pull type of thing in which ever init.d script starts its dependencies. I don't think this is a good idea. No, it is not. The dependencies are cached. Cached? As in queried beforehand? As in two-pass algorithm, once iterating init.d with 'depends' as option, then with 'start' ? Yeah, that sounds nice. -- Please do not send copies of list mail to me; I read the list! .''`. martin f. krafft [EMAIL PROTECTED] : :' :proud Debian developer, admin, user, and author `. `'` `- Debian - when you have better things to do than fixing a system Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver! women can keep a secret just as well as men, but it takes more of them to do it. signature.asc Description: Digital signature
Re: init.d script dependencies for etch?
On Fri, 01 Apr 2005 20:40:08 +0200, Bastian Blank wrote: | need clock hostname | provide logger I take it that this is Richard Gooch's simpleinit system as furnished in util-linux. http://www.atnf.csiro.au/people/rgooch/linux/boot-scripts/ Before commenting, people should go and read about the several free init systems available out there. There's also runit, minit, etc. There have been other threads on debian-devel about this issue, e.g.: http://lists.debian.org/debian-devel/2004/08/msg01393.html http://lists.debian.org/debian-devel/2003/10/msg01078.html http://lists.debian.org/debian-devel/2004/06/msg01445.html http://lists.debian.org/debian-devel/2003/11/msg01695.html http://lists.debian.org/debian-devel/2003/09/msg01359.html http://lists.debian.org/debian-devel/2003/01/msg01898.html -- Thomas Hood -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]