From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jacek Konieczny Subject: Re: [PATCH] systemd: add support initial systemd service files Date: Wed, 12 Mar 2014 09:16:28 +0100 Message-ID: <532017DC.1000208@jajcus.net> References: <1394582593-8910-1-git-send-email-mcgrof@do-not-panic.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WNeL3-0001gU-DB for xen-devel@lists.xenproject.org; Wed, 12 Mar 2014 08:16:33 +0000 In-Reply-To: <1394582593-8910-1-git-send-email-mcgrof@do-not-panic.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Luis R. Rodriguez" , xen-devel@lists.xenproject.org Cc: "Luis R. Rodriguez" , Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 03/12/14 01:03, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" > = > I've tested these on an OpenSUSE Tumbleweed source install. > They are based on the ones from OpenSUSE but slightly modified. These seems quite wrong to me. Why create systemd services, while they are only wrappers to the old-style LSB scripts? What do we gain? Systemd provides great process control and monitoring, but it can only do that if it starts the process by itself =96 it knows the main PID then, knows if the service is running, etc. systemd can do a better job handling old init.d scripts through its compatibility functions than when it is told to run such a script through ExecStart/ExecStop. > diff --git a/tools/hotplug/Linux/xencommons.service b/tools/hotplug/Linux= /xencommons.service > new file mode 100644 > index 0000000..8042b24 > --- /dev/null > +++ b/tools/hotplug/Linux/xencommons.service > @@ -0,0 +1,12 @@ > +[Unit] > +Description=3DXencommons - Script to start and stop xenstored and xencon= soled > +ConditionPathIsDirectory=3D/proc/xen > + > +[Service]xenstored > +Type=3Doneshot > +RemainAfterExit=3Dtrue > +ExecStart=3D-/etc/init.d/xencommons start > +ExecStop=3D/etc/init.d/xencommons stop This is especially bad: two processes started through one service, no startup status verified. The right thing to do is to provide separate systemd unit for xenstored and xenconsoled. If 'xencommons.service' is needed, to have a compatible service name with the LSB scripts, then it should be a dummy service with: Wants=3Dxenstored.service xenconsoled.service And both xenstored.service and xenconsoled.service should have: PartOf=3Dxencommons.service Greets, Jacek