[systemd-devel] macros in systemd unit files question
teg at jklm.no
Wed Jul 31 07:20:06 PDT 2013
On Wed, Jul 31, 2013 at 4:03 PM, lux-integ <lux-integ at btconnect.com> wrote:
> IF mountpoint exists
> /bin/echo "....obladee"
> /bin/mount /dev/something $mountpoint
> /bin/echo "....obladaa"
> /bin/mount /dev/something somewherelse
> does this file need to be stripped of the /bin/echo lines?
> in otherwords will systemd print the "obladee" or "obladaa.." lines during
> execution or do they need to be removed before ExecStart works?
By default, anything you print to stdout (e.g. using echo) will end up
in the journal and not on the console. If you want to override that
you can set StandardOutput=journal+console (see
http://0pointer.de/public/systemd-man/systemd.exec.html). Though, that
is typically not what you want.
The suggestions from Michal and Colin seem like the best option for
you (rather than a shell script).
More information about the systemd-devel