How to get the systemd resolver to resolve local (i.e. unqalified) names?
Xen
list at xenhideout.nl
Sun Jun 4 11:56:29 UTC 2017
Tom H schreef op 04-06-2017 13:37:
> It doesn't make sense because root is the default user for units under
> "/{lib,etc}/systemd/system/" but if you say that it didn't work, it
> didn't work.
I know, and everything else (simple commands such as tee) did work, but
mail didn't.
It also didn't give an error.
I just got no emails.
But it's rather hard to put multiline commands on a ExecStart line and I
didn't want to use a script ;-).
So the "mail" command started working as soon as I used "su -c" instead
of "sh -c" even though it should not make any difference.
I could have tried "echo -e "message\nbla\nbla\n" | /usr/sbin/sendmail"
instead.
But I forgot about that possibility.
Instead I tried to use "mail" which doesn't require newlines to send
something.
Yet the default environment provided by systemd causes it to fail, but
by inserting "su" in between, it works.
I don't know WHY. I just know that it does. I don't know the intrinsics
of mail, so I really can't tell.
It's just weird, that's all :p.
More information about the ubuntu-users
mailing list