Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] converting openrc's dmesg to systemd service file
Date: Thu, 03 Apr 2014 15:52:43
Message-Id: 533D83A5.4090300@gmail.com
In Reply to: Re: [gentoo-user] converting openrc's dmesg to systemd service file by "Canek Peláez Valdés"
1 On 03/04/2014 17:35, Canek Peláez Valdés wrote:
2 > On Thu, Apr 3, 2014 at 7:25 AM, Douglas J Hunley <doug.hunley@×××××.com> wrote:
3 >> I'm sure this is way more trivial than I'm making it out to be, but how in
4 >> the world would one converty /etc/init.d/dmesg to a systemd service file?
5 >
6 > Mmmh. Seeing [1], I really don't think that's a *service*. It's the
7 > kind of abuse that SysV scripts usually fall into.
8 >
9 > What do you want to accomplish? Less output in the console when
10 > booting with systemd? Then you can set the quiet *kernel* command
11 > line. If you want systemd to be more (or less) verbose, then you can
12 > pass it different arguments in the kernel command line; see [2].
13 >
14 >> Is there a good online pointer about building service files?
15 >
16 > The guide in [3] is a start; but I don't think it will help you, since
17 > /etc/init.d/dmesg is not a service. Is a hack to control console
18 > output behavior jammed into the init system because why not.
19 >
20 > Regards.
21 >
22 > [1] http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=blob;f=init.d/dmesg.in;h=5b001fca7542ce7e003af30ca49fdf471efd8871;hb=HEAD
23 > [2] http://www.freedesktop.org/software/systemd/man/systemd.html#Kernel%20Command%20Line
24 > [3] http://0pointer.de/blog/projects/systemd-for-admins-3.html
25 >
26
27 Let's be fair to SysV init though. This is not a hack in the true sense
28 of the word as SysV doesn't impose the concept of a "service" as such.
29 It's more of a $DO_STUFF_HERE concept, as in:
30
31 - start pid 1
32 - read /etc/inittab
33 - DO_STUFF_HERE (determined by /etc/rc.d/*)
34 - run login on consoles
35
36 SysV init pays no attention to what the various STUFF might be so they
37 can correctly be anything and are considered to be unmanaged.
38
39 Systemd is an effort to categorize things, and to get them consistent,
40 manageable and *managed*. As such, dmesg indeed does not belong with
41 services, but somewhere else.
42
43
44 --
45 Alan McKinnon
46 alan.mckinnon@×××××.com