Re: Dual init scripts (or two init scripts in one package)

2010-05-08 Thread Vincent Danjean
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 vdanj...@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-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4be5e749.2040...@free.fr



Re: Dual init scripts (or two init scripts in one package)

2010-05-08 Thread Ron Johnson

On 05/07/2010 09:35 PM, Russ Allbery wrote:

Roberto C. Sánchez  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-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4be5dbe4.60...@cox.net



Re: Dual init scripts (or two init scripts in one package)

2010-05-08 Thread Russ Allbery
Roberto C. Sánchez  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 (r...@debian.org)   


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87eihmbc0u@windlord.stanford.edu



Re: Dual init scripts (or two init scripts in one package)

2010-05-08 Thread Roberto C . Sánchez
On Fri, May 07, 2010 at 07:35:02PM -0700, Russ Allbery wrote:
> Roberto C. Sánchez  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


signature.asc
Description: Digital signature


Re: Dual init scripts (or two init scripts in one package)

2010-05-07 Thread Russ Allbery
Roberto C. Sánchez  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 (r...@debian.org)   


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87d3x786jt@windlord.stanford.edu