Dual init scripts (or two init scripts in one package)
Greetings. I am curious as to how the scenario described in the below
message would work in Debian. That is, can one package install two init scripts? Regards, -Roberto ----- Forwarded message from Tom Eastep <teastep@shorewall.net> ----- Date: Tue, 04 May 2010 12:28:47 -0700 Subject: Dual init scripts From: Tom Eastep <teastep@shorewall.net> To: "Roberto C. Sanchez" <roberto@connexer.com> Hi Roberto, The Gentoo folks have an issue with the way that Shorewall is normally started; namely, we supply init scripts that start the firewall after networking has started. This is an issue in that there is a window after networking starts but before Shorewall starts when the firewall is wide open. SuSEFirewall manages this issue by having multiple init scripts; one that runs prior to networking startup and one that runs after. That is what I'm planning to do with Shorewall in 4.4.10. So the question is, can a single 'shorewall' package (for example), provide both scripts or do I need four additional packages, the only purpose of which would be to provide 4 additional init scripts. Thanks, -Tom -- Tom Eastep When I die, I want to go like my Grandfather who Shoreline, died peacefully in his sleep. Not screaming like Washington, USA all of the passengers in his car http://shorewall.net \________________________________________________ ----- End forwarded message ----- -- Roberto C. Sánchez http://people.connexer.com/~roberto http://www.connexer.com |
Dual init scripts (or two init scripts in one package)
Roberto C. Sánchez <roberto@connexer.com> writes:
> Greetings. I am curious as to how the scenario described in the below > message would work in Debian. That is, can one package install two init > scripts? Sure. A package can install as many init scripts as it wants and needs. -- Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/> -- To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 87d3x786jt.fsf@windlord.stanford.edu">http://lists.debian.org/87d3x786jt.fsf@windlord.stanford.edu |
Dual init scripts (or two init scripts in one package)
On Fri, May 07, 2010 at 07:35:02PM -0700, Russ Allbery wrote:
> Roberto C. Sánchez <roberto@connexer.com> writes: > > > Greetings. I am curious as to how the scenario described in the below > > message would work in Debian. That is, can one package install two init > > scripts? > > Sure. A package can install as many init scripts as it wants and needs. > So, currently the shorewall package ships debian/shorewall.init, which is accompanied by the following debian/rules entry: dh_installinit --no-start -u"start 40 S . stop 89 0 6 ." If I read the dh_installinit manpage correctly, then I can ship: debian/shorewall.shorewall-prenet.init debian/shorewall.shorewall-postnet.init Then in debian/rules I would have: dh_installinit --no-start --name=shorewall-prenet -u"start 35 S . stop 89 0 6 ." dh_installinit --no-start --name=shorewall-postnet -u"start 40 S . stop 89 0 6 ." The idea is to have one init script that runs before S40networking and another that runs after. Does this seem right? I will still have to figure out the right start and stop values, but I just want to make sure I generally have the mechanics right. Regards, -Roberto -- Roberto C. Sánchez http://people.connexer.com/~roberto http://www.connexer.com |
Dual init scripts (or two init scripts in one package)
Roberto C. Sánchez <roberto@connexer.com> writes:
> So, currently the shorewall package ships debian/shorewall.init, which > is accompanied by the following debian/rules entry: > dh_installinit --no-start -u"start 40 S . stop 89 0 6 ." > If I read the dh_installinit manpage correctly, then I can ship: > debian/shorewall.shorewall-prenet.init > debian/shorewall.shorewall-postnet.init > Then in debian/rules I would have: > dh_installinit --no-start --name=shorewall-prenet -u"start 35 S . stop 89 0 6 ." > dh_installinit --no-start --name=shorewall-postnet -u"start 40 S . stop 89 0 6 ." > The idea is to have one init script that runs before S40networking and > another that runs after. Does this seem right? Yup, that looks right to me, although of course these days the LSB headers in the scripts are more important (thankfully) than the defaults given to dh_installinit. I think that -- is now preferred over -u for passing extra parameters along through the debhelper script, although of course both work. -- Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/> -- To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 87eihmbc0u.fsf@windlord.stanford.edu">http://lists.debian.org/87eihmbc0u.fsf@windlord.stanford.edu |
Dual init scripts (or two init scripts in one package)
On 05/07/2010 09:35 PM, Russ Allbery wrote:
Roberto C. Sánchez<roberto@connexer.com> writes: Greetings. I am curious as to how the scenario described in the below message would work in Debian. That is, can one package install two init scripts? Sure. A package can install as many init scripts as it wants and needs. What about putting it's startup script in /etc/network/if-up.d/? Or am I misinterpreting it's purpose? -- Dissent is patriotic, remember? -- To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 4BE5DBE4.60506@cox.net">http://lists.debian.org/4BE5DBE4.60506@cox.net |
Dual init scripts (or two init scripts in one package)
On 08/05/2010 14:27, Roberto C. Sánchez wrote:
> So, currently the shorewall package ships debian/shorewall.init, which > is accompanied by the following debian/rules entry: > > dh_installinit --no-start -u"start 40 S . stop 89 0 6 ." > > If I read the dh_installinit manpage correctly, then I can ship: > > debian/shorewall.shorewall-prenet.init > debian/shorewall.shorewall-postnet.init > > Then in debian/rules I would have: > > dh_installinit --no-start --name=shorewall-prenet -u"start 35 S . stop 89 0 6 ." > dh_installinit --no-start --name=shorewall-postnet -u"start 40 S . stop 89 0 6 ." > > The idea is to have one init script that runs before S40networking and > another that runs after. Does this seem right? Do you really need to rename shorewall to shorewall-postnet in /etc/init.d ? It would unnecessary break admin script to restart the firewall (and you will have to manage a complex pre/postinst to handle cases where the admin changed this conffile). Regards, Vincent -- Vincent Danjean GPG key ID 0x9D025E87 vdanjean@debian.org GPG key fingerprint: FC95 08A6 854D DB48 4B9A 8A94 0BF7 7867 9D02 5E87 Unofficial packages: http://moais.imag.fr/membres/vincent.danjean/deb.html APT repo: deb http://perso.debian.org/~vdanjean/debian unstable main -- To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 4BE5E749.2040106@free.fr">http://lists.debian.org/4BE5E749.2040106@free.fr |
| All times are GMT. The time now is 10:17 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.