Comment 10 for bug 1419623

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1419623] Re: systemd unmounts partitions from fstab

Quoting Martin Pitt (<email address hidden>):
> I finally understand what's going on. This started a few weeks ago when
> we got lxcfs. What happens:
>
> - lxcfs' upstart job and systemd unit have this gem:
> sed -i "/^lxcfs \/var\/lib\/lxcfs fuse.lxcfs/d" /etc/mtab
>
> This will turn /etc/mtab into a file if it was a symlink to /proc/mounts. But these days we actually want it to be a symlink, as /etc/mtab as a static file is just a braindead and broken concept.

init jobs could be updated to do

 [ ! -h /etc/mtab ] && sed -i "/^lxcfs \/var\/lib\/lxcfs fuse.lxcfs/d" /etc/mtab