On Tue, 17.02.15 23:30, Colin Guthrie (gm...@colin.guthr.ie) wrote: > Lennart Poettering wrote on 17/02/15 10:08: > >> > mount something-else /foo > >> > systemctl start foo.mount > > In this case the second line is a NOP, since the first line already > > mounted something on /foo, and thus made foo.mount active. > > So, even if foo.mount (the actual unit file) specifies it's > What=something (not What=something-else) the fact that *anything* is > mounted to /foo is sufficient to make the foo.mount unit active?
Yes, and this always has been that way. > This seems somewhat counter-intuitive to me. I can understand why from > an implementation perspective - the mount units are all geared around > the mountpoint not the What=, but it's certainly not what I'd expect as > a user. Well it's the only logic that can work really, already since the same device node is usually known to the kernel by a different name thatn to userspace. Trying to always map that is really nasty, as one can see with the GPT generator complexity. > Wouldn't it be better if there was some other state - e.g. "conflict" if > something other than the desired device was mounted to the specified > destination? I think it's really safe not to consider that a problem. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel