Re: Survey answers part 2: the systemd transition

2013-07-01 Thread Vincent Danjean
Le 01/07/2013 20:05, Michael Stapelberg a écrit :
 Hi,
 
 since some people might not read planet debian, here is a link to my
 second blog post in a series of posts dealing with the results of the
 Debian systemd survey:
 
 http://people.debian.org/~stapelberg/2013/07/01/systemd-transition.html

Thank you for this article. Reading it make me think about something
I would like to know: if I install systemd and boot with it (using grub
parameter) as described in the article, what occurs when I type
/etc/init.d/apache2 start
A) when apache2.service exists in the system
B) when apache2.service does not exist

I know that there exists commands to avoid to call theses sysvinit
scripts directly, but direct invocation something that is widely used
around me.

  Regards,
Vincent


-- 
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/51d1de6d.9040...@free.fr



Re: Survey answers part 2: the systemd transition

2013-07-01 Thread Sven Joachim
On 2013-07-01 21:54 +0200, Vincent Danjean wrote:

 Le 01/07/2013 20:05, Michael Stapelberg a écrit :
 Hi,
 
 since some people might not read planet debian, here is a link to my
 second blog post in a series of posts dealing with the results of the
 Debian systemd survey:
 
 http://people.debian.org/~stapelberg/2013/07/01/systemd-transition.html

 Thank you for this article. Reading it make me think about something
 I would like to know: if I install systemd and boot with it (using grub
 parameter) as described in the article, what occurs when I type
 /etc/init.d/apache2 start
 A) when apache2.service exists in the system
 B) when apache2.service does not exist

In both cases, systemctl start apache2.service will be run for you.

 I know that there exists commands to avoid to call theses sysvinit
 scripts directly, but direct invocation something that is widely used
 around me.

If the init script sources /lib/lsb/init-functions, and the vast
majority of Debian scripts do, it will just DTRT.  Have a look at
/lib/lsb/init-functions.d/40-systemd to see how it works.

Cheers,
   Sven


--
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/8738ryuiim@turtle.gmx.de



Re: Survey answers part 2: the systemd transition

2013-07-01 Thread Michael Stapelberg
Hi Vincent,

Vincent Danjean vdanjean...@free.fr writes:
 Thank you for this article. Reading it make me think about something
 I would like to know: if I install systemd and boot with it (using grub
 parameter) as described in the article, what occurs when I type
 /etc/init.d/apache2 start
Fair question.

When you invoke /etc/init.d/apache2 on a machine where the systemd
package is installed, /lib/lsb/init-functions.d/40-systemd will be
invoked because the init script includes /lib/lsb/init-functions¹.

This mechanism will then check whether you are actually running systemd
as PID 1. If so, your action will be diverted to a systemctl call.

The two cases below are equivalent from that point of view — both result
in “systemctl start apache2.service”.

 A) when apache2.service exists in the system
apache2.service will be started; its ExecStart line is something like
/usr/sbin/apache2ctl start (this is just an example!).

 B) when apache2.service does not exist
apache2.service will be started; its ExecStart line is
/etc/init.d/apache2 start, so systemd will run the init script for you.

Hope that helps.

① In case the init script does not, that’s a problem. We’ll have a
  lintian check in place real soon to warn about this.

-- 
Best regards,
Michael


--
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/x6ip0uypt6@midna.lan