Message ID | 4be6668a795a8af830d18094decfffdf18e5090f.1466622379.git.yann.morin.1998@free.fr |
---|---|
State | Accepted |
Headers | show |
Hi Yann, Le 22/06/2016 à 21:07, Yann E. MORIN a écrit : > Currently, our /etc/mtab points to /proc/mounts. This was all neat so > far, and was good for a sysv-like init system. > > However, the way today is to point it at /proc/self/mounts, the > per-process mount tab. > > Additionnally, that's what systemd expects. If /etc/mtab is not a > symlink to ../proc/self/mounts and the rootfs is readonly, systemd would > whine loudly (and a service unit would be marked failed). > > Since it works well for sysv-like init systems too, just use that. Reviewed-by: Romain Naour <romain.naour@gmail.com> Best regards, Romain > > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > --- > system/skeleton/etc/mtab | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/system/skeleton/etc/mtab b/system/skeleton/etc/mtab > index 4c0a094..5c4677a 120000 > --- a/system/skeleton/etc/mtab > +++ b/system/skeleton/etc/mtab > @@ -1 +1 @@ > -/proc/mounts > \ No newline at end of file > +../proc/self/mounts > \ No newline at end of file >
On 22-06-16 21:07, Yann E. MORIN wrote: > Currently, our /etc/mtab points to /proc/mounts. This was all neat so > far, and was good for a sysv-like init system. > > However, the way today is to point it at /proc/self/mounts, the > per-process mount tab. > > Additionnally, that's what systemd expects. If /etc/mtab is not a > symlink to ../proc/self/mounts and the rootfs is readonly, systemd would > whine loudly (and a service unit would be marked failed). > > Since it works well for sysv-like init systems too, just use that. > > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> I was worried a bit that /proc/self/mounts would need a relatively recent kernel, but it already existed in 2.6.18 and probably earlier, so that's OK. Then I worried about the relative instead of absolute symlink (I prefer an absolute symlink for something like this), but is seems systemd really wants the relative link, so OK. Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Regards, Arnout > --- > system/skeleton/etc/mtab | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/system/skeleton/etc/mtab b/system/skeleton/etc/mtab > index 4c0a094..5c4677a 120000 > --- a/system/skeleton/etc/mtab > +++ b/system/skeleton/etc/mtab > @@ -1 +1 @@ > -/proc/mounts > \ No newline at end of file > +../proc/self/mounts > \ No newline at end of file >
Hello, On Wed, 22 Jun 2016 21:07:26 +0200, Yann E. MORIN wrote: > Currently, our /etc/mtab points to /proc/mounts. This was all neat so > far, and was good for a sysv-like init system. > > However, the way today is to point it at /proc/self/mounts, the > per-process mount tab. > > Additionnally, that's what systemd expects. If /etc/mtab is not a > symlink to ../proc/self/mounts and the rootfs is readonly, systemd would > whine loudly (and a service unit would be marked failed). > > Since it works well for sysv-like init systems too, just use that. > > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > --- > system/skeleton/etc/mtab | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to master, thanks. Thomas
diff --git a/system/skeleton/etc/mtab b/system/skeleton/etc/mtab index 4c0a094..5c4677a 120000 --- a/system/skeleton/etc/mtab +++ b/system/skeleton/etc/mtab @@ -1 +1 @@ -/proc/mounts \ No newline at end of file +../proc/self/mounts \ No newline at end of file
Currently, our /etc/mtab points to /proc/mounts. This was all neat so far, and was good for a sysv-like init system. However, the way today is to point it at /proc/self/mounts, the per-process mount tab. Additionnally, that's what systemd expects. If /etc/mtab is not a symlink to ../proc/self/mounts and the rootfs is readonly, systemd would whine loudly (and a service unit would be marked failed). Since it works well for sysv-like init systems too, just use that. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> --- system/skeleton/etc/mtab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)