Core Update 167: Replace /etc/mtab by symlink to /proc/self/mounts

mount, as updated via util-linux, no longer writes /etc/mtab, causing
programs to rely on this file's content (such as the check_disk Nagios
plugin) to stop working.

/proc/self/mounts contains all the necessary information, so it is fine
to replace /etc/mtab by a symlink to it.

Fixes: #12843

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
This commit is contained in:
Peter Müller
2022-04-11 19:14:43 +00:00
parent 2506def0a6
commit cad2ce78dd
5 changed files with 8 additions and 13 deletions

View File

@@ -1,7 +1,9 @@
etc/collectd.conf
etc/inittab.d
etc/rc.d/init.d/firewall
etc/rc.d/init.d/mountfs
etc/rc.d/init.d/pakfire
etc/rc.d/init.d/partresize
etc/sysctl.conf
lib/udev/network-hotplug-bridges
srv/web/ipfire/cgi-bin/connections.cgi

View File

@@ -386,6 +386,10 @@ hardlink -c -vv /lib/firmware
# Regenerate all initrds
dracut --regenerate-all --force
# Replace /etc/mtab by symlink as mount no longer writes it
rm -vf /etc/mtab
ln -vs /proc/self/mounts /etc/mtab
# Export the location database again and reload the firewall engine
/usr/local/bin/update-location-database