<div dir="ltr"><div></div>While playing with this I've also noticed that systemd treats symlinks in a bit<br><div>weird way: looks like if it sees a symlink it dereferences it, but not all the symlinks<br>in the path. Here is an example:<br>

<br># systemctl show systemd-udevd.service -p FragmentPath<br>FragmentPath=/usr/lib64/systemd/system/systemd-udevd.service<br># ln -s /usr/lib/systemd/system/systemd-udevd.service /etc/systemd/system<br># systemctl daemon-reload<br>

# systemctl show systemd-udevd.service -p FragmentPath<br>FragmentPath=/usr/lib/systemd/system/systemd-udevd.service<br># readlink -f /etc/systemd/system/systemd-udevd.service <br>/usr/lib64/systemd/system/systemd-udevd.service<br>

<br>I feel that I'm interested in the _reason_ why this unit is loaded, that is, I guess,<br>I'd like to see `/etc/systemd/system/system-udevd.service` in this case, as it<br>_explains why_ systemd loaded this unit.<br>

But what I see is `/usr/lib/systemd/system/systemd-udevd.service` which is<br>totally unhelpful as it is neither the path that systemd used to discover the unit,<br>nor the actual path to the unit file (which is `/usr/lib64/…`).<br>

(Here, on Gentoo, `/usr/lib` is a symlink to `/usr/lib64`.)<br><br>Probably, somehow using this and the fact that if `cp`'s target is a symlink,<br>then the symlink's target will be overwritten with the symlink left where it was,<br>

it is possible to reproduce the issue.<br></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div><br></div>--<br>Кирилл Елагин</div></div>
<br><br><div class="gmail_quote">On Wed, Apr 23, 2014 at 8:43 AM, Lennart Poettering <span dir="ltr"><<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

On Sun, 30.03.14 19:23, Andrey Borzenkov (<a href="mailto:arvidjaar@gmail.com">arvidjaar@gmail.com</a>) wrote:<br>
<br>
> linux-qbc6:~ # systemctl show systemd-udevd.service -p FragmentPath<br>
> FragmentPath=/usr/lib/systemd/system/systemd-udevd.service<br>
> linux-qbc6:~ # cp /usr/lib/systemd/system/systemd-udevd.service /etc/systemd/system<br>
> linux-qbc6:~ # systemctl daemon-reload<br>
> linux-qbc6:~ # cp /usr/lib/systemd/system/systemd-udevd.service /etc/systemd/system<br>
> linux-qbc6:~ # systemctl show systemd-udevd.service -p FragmentPath<br>
> FragmentPath=/usr/lib/systemd/system/systemd-udevd.service<br>
> linux-qbc6:~ # exit<br>
><br>
> >From non-exhaustive testing it appears to be the only unit showing this<br>
> property. Enabling systemd debug does not add any useful information<br>
> (no output about unit discovery). Any way to debug it?<br>
><br>
> The version is systemd-208-19.1.x86_64 from openSUSE.<br>
<br>
Hmm, that's weird. Is /etc on some weird mount point or so?<br>
<br>
It might be interesting to run "strace -o log -e open -p 1" and then trigger a<br>
reload, and then look at the generate log file "log". It should show you<br>
where systemd is looking for the udev service file, and might contain a<br>
hint, why it skips the file in /etc?<br>
<span class="HOEnZb"><font color="#888888"><br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Red Hat<br>
_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
</font></span></blockquote></div><br></div>