1 |
Jonathan Callen posted on Sat, 15 Mar 2014 02:21:38 -0400 as excerpted: |
2 |
|
3 |
> The correct way to do this is to create the file with contents like the |
4 |
> following: |
5 |
> |
6 |
> [Service] |
7 |
> ExecStart= |
8 |
> ExecStart=/usr/bin/gpm --my --options |
9 |
> |
10 |
> The first ExecStart= line is a special case that tells systemd to unset |
11 |
> the ExecStart parameter completely so you can override it (instead of |
12 |
> adding additional commands to run on startup). |
13 |
|
14 |
Thanks. I'll try that. |
15 |
|
16 |
(I had thought about it as I had read something to that effect, but I |
17 |
only thought it applied to resetting accumulatives, and save for oneshot |
18 |
types, execstart must be single-shot, thus the problem in the first |
19 |
place. But if you say it works... and this /will/ be my first time using |
20 |
the reset technique.) |
21 |
|
22 |
But I'm rebooted with openrc ATM. I needed to test if the /var/tmp bind- |
23 |
mount to the tmpfs on /tmp would work in openrc or not (it did), and |
24 |
decided while I was at it that I needed a break from worrying about |
25 |
systemd, to get some other things done, including an emerge update on top |
26 |
of something I was familiar with, since I hadn't updated in over a week, |
27 |
due to focusing on getting systemd working. |
28 |
|
29 |
Meanwhile, my next big systemd-land hump to get over is deciding whether |
30 |
I want to reactivate syslog-ng as my general purpose logger (with journald |
31 |
set storage=volatile, as I set that temporarily while I figured things |
32 |
out), or whether I want to unmerge syslog-ng and switch entirely to |
33 |
journald, setting storage=persistent. |
34 |
|
35 |
If I switch to journald I'll have to seriously investigate filtering, as |
36 |
among other things I've one script that does an sudo every 10 seconds |
37 |
(IIRC), and while I have sudo's logging already configured separately, |
38 |
there's still an sudo-related pamd entry spit to syslog for each of |
39 |
those. I have syslog-ng set to simply dump those but I noticed them in |
40 |
journald when I set it to output to tty12, too -- when that script was |
41 |
running the tty12 output was unusable as it was all but 100% noise from |
42 |
that. I was glad I had storage=volatile set! |
43 |
|
44 |
The other alternative, since that 10-second sudo is actually log related |
45 |
too (being effectively a /var/log/messages tail to superkaramba when I'm |
46 |
in X/kde), is to figure out how to do something similar using journald, |
47 |
without the sudo but without giving the graphical user unlimited log- |
48 |
checking privs (sudo is setup to allow that one very specific command, |
49 |
not anything else, presently). |
50 |
|
51 |
But regardless, I'll need to learn how to manage filtering in journald |
52 |
anyway; this is simply the first and most pressing reason to do so, not |
53 |
the only one. |
54 |
|
55 |
And of course if I switch to journald I'll need to adjust that script |
56 |
anyway... ideally by configuring journald to write an unprivileged tail |
57 |
log (say 20 lines or whatever) to somewhere on tmpfs so all I'll need to |
58 |
do in superkaramba is to have it output that file directly, avoiding the |
59 |
script entirely. |
60 |
|
61 |
IOW, now I have to basically repeat for journald the same process I did |
62 |
for systemd in general, figure out what it would take to convert to it, |
63 |
and whether I actually want to, or whether I'd prefer to keep journald |
64 |
set to storage=volatile and simply forward to syslog-ng, mostly keeping |
65 |
the existing (somewhat advanced for a single host) syslog-ng |
66 |
configuration in place. |
67 |
|
68 |
I'm thinking about just punting for now, activating syslog-ng pretty much |
69 |
with the existing config (changed my existing syslog-ng filters as |
70 |
necessary to deal with any systemd specific logging) in systemd, and |
71 |
keeping journald set storage=volatile. |
72 |
|
73 |
But that's why I'm taking a rest from systemd ATM, back on openrc, to |
74 |
study journald at my leisure now that I have systemd itself more or less |
75 |
setup and am thus familiar with /its/ workings, and then give my |
76 |
subconscious time to weigh the syslog/journal options and come to its own |
77 |
decision, before I make the conscious decision and get down and dirty in |
78 |
the config, implementing it. |
79 |
|
80 |
Meanwhile, with a bit of luck gentoo/systemd and the various upstreams |
81 |
will work thru the systemd-209+ networking and dracut related issues, and |
82 |
I'll have a more permanent networkd based systemd-network service config |
83 |
to replace my current temporary network.service hack, by the time I get |
84 |
the journald stuff worked out and hopefully switch over to systemd more |
85 |
or less permanently. |
86 |
|
87 |
-- |
88 |
Duncan - List replies preferred. No HTML msgs. |
89 |
"Every nonfree program has a lord, a master -- |
90 |
and if you use the program, he is your master." Richard Stallman |