[opensuse] systemd service units with ExecStartPre=-/bin/echo 'Starting something:' ?
I have a couple of systemd service units with ExecStartPre=-/bin/echo 'Starting something:' (e.g. spamd and postfix I think). The echo just leaves lines like these in /var/log/messages: 2012-12-07T12:23:48+01:00 dupont5 echo[2799]: Starting mail service 2012-12-07T16:15:03+01:00 dupont5 echo[4778]: Starting spamd: I was just wondering what the purpose of this ExecStartPre is? -- Per Jessen, Zürich (-1.4°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
El 07/12/12 12:21, Per Jessen escribió:
I was just wondering what the purpose of this ExecStartPre is?
The purpose is to provide support for daemons or programs that need to execute stuff before the main program, usually hacks for poorly implemented/integrated daemons. To answer the question in $SUBJECT: "Daemons will be executed in their own session, and STDIN/STDOUT/STDERR connected to /dev/null unless otherwise configured. The umask is reset." see daemon(7) for details. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Cristian Rodríguez wrote:
El 07/12/12 12:21, Per Jessen escribió:
I was just wondering what the purpose of this ExecStartPre is?
The purpose is to provide support for daemons or programs that need to execute stuff before the main program, usually hacks for poorly implemented/integrated daemons.
Thanks Cristian, but I was more interested in _this_ ExecStartPre -/bin/echo 'Starting <something>:' ? I mean, why write that to the log? It reminds me of what we do in sysVinit scripts, but it doesn't seem to make much sense with systemd. /Per -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
El 07/12/12 18:29, Per Jessen escribió: Sorry I "fast read" your post and got you wrong ;)
I mean, why write that to the log? It reminds me of what we do in sysVinit scripts, but it doesn't seem to make much sense with systemd.
The units need to be fixed indeed ;) systemd already writes that information to the journal. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Cristian Rodríguez wrote:
El 07/12/12 18:29, Per Jessen escribió:
Sorry I "fast read" your post and got you wrong ;)
No probs, happens to me too.
I mean, why write that to the log? It reminds me of what we do in sysVinit scripts, but it doesn't seem to make much sense with systemd.
The units need to be fixed indeed ;) systemd already writes that information to the journal.
Were they automagically converted perhaps? -- Per Jessen, Zürich (-1.5°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/7/2012 10:21 AM, Per Jessen wrote:
I have a couple of systemd service units with
ExecStartPre=-/bin/echo 'Starting something:'
(e.g. spamd and postfix I think).
The echo just leaves lines like these in /var/log/messages:
2012-12-07T12:23:48+01:00 dupont5 echo[2799]: Starting mail service 2012-12-07T16:15:03+01:00 dupont5 echo[4778]: Starting spamd:
I was just wondering what the purpose of this ExecStartPre is?
I would say because it's clearly more efficient and flexible to add an ExecStartPre feature to systemd and the systemd service/config file format, than to just insert the same line or any lines you like into the old init scripts, without requiring any special support from /sbin/init to do it... -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Brian K. White
-
Cristian Rodríguez
-
Per Jessen