[systemd-devel] Hard-coded /bin/mount in systemd
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Wed Nov 27 06:40:50 PST 2013
On Wed, Nov 27, 2013 at 03:12:02PM +0100, Hannes Reinecke wrote:
> On 11/27/2013 02:58 PM, Mantas Mikulėnas wrote:
> > On Wed, Nov 27, 2013 at 3:31 PM, Hannes Reinecke <hare at suse.de> wrote:
> >>
> >> Hi all,
> >>
> >> for some reason systemd has /bin/mount hardcoded in
> >> src/core/mount.c:mount_enter_mounting()
> >>
> >> Which is a bit odd, seeing that everyting moved to /usr/bin.
> >> So we always have to do a symlink here, which really is a bit annoying.
> >>
> >> Is this by design or a simple left-over?
> >
> > If *everything* moved to /usr/bin, then /bin itself has to be a
> > symlink anyway (as many tools expect and some standards require
> > specific commands to be in /bin).
> >
> Ah. IIRC it was _systemd_ which initiated the move to /usr, so I
> found it slightly odd to rely on a location which it has just
> obsoleted ...
> Or, rather, to have a hard-coded location to start with.
It's a pragmatic choice: we know that /bin/mount will work both for
separate-/usr and merged-/usr. We *could* introduce a configure time
check for the location of mount, but there would be no practical
gain. Not having /bin at all is very unlikely, since /bin/sh is
hardcoded in many more places.
C.f. https://bugs.freedesktop.org/show_bug.cgi?id=55248, where gentoo
had kexec in a different place. In that case a practical reason
existed.
Zbyszek
More information about the systemd-devel
mailing list