Re: [systemd-devel] Systemd Questions

2016-08-14 Thread Che
On Sun, Aug 14, 2016 at 8:34 AM, Reindl Harald 
wrote:

>
> Am 14.08.2016 um 14:29 schrieb Tom Browder:
>

> 3. If Debian 8 is running systemd for a service, why do I need an
>> entry for a service in init.d?
>>
>
> you don't


If I'm not mistaken, systemd is still referenced in /etc/init.d in Debian
in some way, because systemd is still de facto transitional: and thus
continues to maintain backward compatibility with SysVinit. So many people
will probably not understand why systemd continues to be linked to various
parts of the old SysVinit system -- when it is supposed to be outright
replacing it.

Point is: it takes time to properly and safely transition core
infrastructure.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd Questions

2016-08-14 Thread Reindl Harald



Am 14.08.2016 um 15:20 schrieb Tom Browder:

On Sun, Aug 14, 2016 at 7:34 AM, Reindl Harald  wrote:

to be honest: did you read *any* documentation or anything about systemd
before your post besides "it exists"?


Yes I did, a tutorial and man systemd. Have you ever looked at the man
page from the view point of a newbie?


surely, in 2011 as i had to convert the whole infrastructure to systemd 
with Fedora 15 or so i was a newbie too, finally there where way more 
native systemd-units in /et/systemd/system/ than Fedora itself shipped 
for years



There are no examples.  There
is no clear explanation of COMMAND from a user stand point (command
line operation), etc.  To be fair, I find most man pages are lacking
in real example of usage.


surely "man systemctl" - well, you need to know that command but it's a 
liltle bit unfair to criticize that because the knowledge how to 
start/stop services with sysvinit did also not fall from heacen



And the fact that Debian magically uses systemd even with an init.d
service file is misleading until you look closely at the script.


thats the compatibility layer of systemd where a generator creates a 
on-the-fly unit at boot - that prevents you from dealing with 2 
different ways of stop/start services where you would need to look which 
type it is



I did go to the systemd home page and got a bit farther, but it still
looks like a painful dig from here (I need a "Systemd for Dummies!")


if you would have spent 10 seconds you have found dozens
https://www.google.com/search?q=systemd+for+newbies

https://www.linux.com/learn/managing-services-linux-systemd
http://www.catchlinux.com/what-is-systemd-for-noobs/



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd Questions

2016-08-14 Thread Tom Browder
On Sunday, August 14, 2016, Mantas Mikulėnas  wrote:
...

Thank you for all the info, Mantas--very helpful!

Best regards,

-Tom
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd Questions

2016-08-14 Thread Mantas Mikulėnas
On Sun, Aug 14, 2016 at 3:29 PM, Tom Browder  wrote:

> I am trying to get comfortable with systemd on Debian 8 but am very
> confused by the complex documentation.
>
> I am a simple man with a simple need to be able to modiify startup
> scripts for several packages I build from source which currently are:
>
> + apache (httpd)
> + postgresql
> + bind9
>
> I'm not sure of a few things under systemd:
>
> 1. What exactly is the command to start or stop a service (consider
> the three above)?
>

With native systemd .services, it's taken from the unit's ExecStart= and
ExecStop= (the default for the latter is SIGTERM).

SysV-compat services (see below) just run "/etc/init.d/httpd start", so
everything works as before.

In either case, `systemctl status …` shows the command that was used.

2. Where exactly do I modify starting, status, and stopping parameters
> for a service?
>

With native systemd .services, either use `systemctl edit [--full]`, or
manually copy the .service file to /etc/systemd/system and edit it there
(use `systemctl daemon-reload` afterwards).

With SysV-compat services, either edit the old initscript in /etc/init.d/
(as before), or write a native .service from scratch.


> 3. If Debian 8 is running systemd for a service, why do I need an
> entry for a service in init.d?
>

You don't – it's just that many Debian packages haven't been ported to
systemd yet, therefore systemd still uses the "SysV compatibility" mode for
them (which generates dummy .services with "/etc/init.d/whatever start").


> 4. Do I have to use systemd for a service?  If not, how do I do that?
>

You should. The SysV compat mode had to sacrifice some basic functionality
(like knowing whether the daemon is still running...) in order to still
work with all the weird init.d scripts out there. If nothing else, writing
a native .service might be useful both to learn systemd and to avoid the
several layers of indirection.

-- 
Mantas Mikulėnas 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd Questions

2016-08-14 Thread Mantas Mikulėnas
On Sun, Aug 14, 2016 at 5:30 PM, Mantas Mikulėnas  wrote:

> On Sun, Aug 14, 2016 at 3:29 PM, Tom Browder 
> wrote:
>
>> I am trying to get comfortable with systemd on Debian 8 but am very
>> confused by the complex documentation.
>>
>> I am a simple man with a simple need to be able to modiify startup
>> scripts for several packages I build from source which currently are:
>>
>> + apache (httpd)
>> + postgresql
>> + bind9
>>
>> I'm not sure of a few things under systemd:
>>
>> 1. What exactly is the command to start or stop a service (consider
>> the three above)?
>>
>
> With native systemd .services, it's taken from the unit's ExecStart= and
> ExecStop= (the default for the latter is SIGTERM).
>
> SysV-compat services (see below) just run "/etc/init.d/httpd start", so
> everything works as before.
>
> In either case, `systemctl status …` shows the command that was used.
>

The above was thinking you were asking about what command systemd *itself*
uses to run the daemon... The user-facing commands are `systemctl start
httpd` or `service httpd start` (both should do the same thing).

-- 
Mantas Mikulėnas 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] unknown problem with systemd

2016-08-14 Thread Michał Zegan
But how to check what is happening? and I am still not sure why my
normal laptop with systemd works properly and starts journald.

W dniu 14.08.2016 o 06:56, Andrei Borzenkov pisze:
> 14.08.2016 04:58, Michał Zegan пишет:
>> Hello. I have installed systemd version 231 from arch repos. actually it
>> is systemd-selinux from aur. now, the problem:
>> the system boots. but some services fail to start, notably
>> systemd-journald and systemd-networkd, not sure if others fail too.
>> When checking what happened using dmesg as journald does not work, I get
>> that the control process received signal 31, marked sigsys. no explanation.
>> I have normal systemd 231 on my laptop, and it works with journal and
>> all. In addition, running processes normally on this pc where it does
>> not work does not kill them with signal sigsys.
> 
> SIGSYS is used by seccomp to kill process with SECCOMP_RET_KILL. So it
> looks like some too restrictive filters are in effect.
> 
>> Does anyone know or suspect what may be the cause? My kernel has a
>> heavily modified configuration, and I just upgraded from 4.6 to 4.7 and
>> configured using make oldconfig.
>>
>>
>>
>> ___
>> systemd-devel mailing list
>> systemd-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>
> 



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Systemd Questions

2016-08-14 Thread Tom Browder
I am trying to get comfortable with systemd on Debian 8 but am very
confused by the complex documentation.

I am a simple man with a simple need to be able to modiify startup
scripts for several packages I build from source which currently are:

+ apache (httpd)
+ postgresql
+ bind9

I'm not sure of a few things under systemd:

1. What exactly is the command to start or stop a service (consider
the three above)?

2. Where exactly do I modify starting, status, and stopping parameters
for a service?

3. If Debian 8 is running systemd for a service, why do I need an
entry for a service in init.d?

4. Do I have to use systemd for a service?  If not, how do I do that?

Thanks.

Best regards,

-Tom
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd Questions

2016-08-14 Thread Reindl Harald



Am 14.08.2016 um 14:29 schrieb Tom Browder:

I am trying to get comfortable with systemd on Debian 8 but am very
confused by the complex documentation.

I am a simple man with a simple need to be able to modiify startup
scripts for several packages I build from source which currently are:

+ apache (httpd)
+ postgresql
+ bind9

I'm not sure of a few things under systemd:

1. What exactly is the command to start or stop a service (consider
the three above)?


systemctl start servicename
systemctl stop servicename


2. Where exactly do I modify starting, status, and stopping parameters
for a service?


/etc/systemd/system/


3. If Debian 8 is running systemd for a service, why do I need an
entry for a service in init.d?


you don't


4. Do I have to use systemd for a service?  If not, how do I do that?


to be honest: did you read *any* documentation or anything about systemd 
before your post besides "it exists"?




signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel