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

@@ -87,7 +87,8 @@ endif
cp -rvf $(DIR_SRC)/config/etc/* /etc;
[ ! -d "$(DIR_SRC)/config/etc-$(BUILD_ARCH)" ] || cp -rvf $(DIR_SRC)/config/etc-$(BUILD_ARCH)/* /etc
cp -rvf $(DIR_SRC)/config/lib/* /lib;
touch /etc/{fs,m}tab
touch /etc/fstab
ln -s /proc/self/mounts /etc/mtab
echo "$(NAME) v$(VERSION) - $(SLOGAN)" > /etc/issue
echo "===============================" >> /etc/issue
echo "\n running on \s \r \m" >> /etc/issue