strongly encourage Linux users to not make /etc/mtab a flat file

The OpenRC team does not currently know of any modern linux tools that
require /etc/mtab to be a flat file, so this puts users on notice that
the mtab service will be removed in the future.
This commit is contained in:
William Hubbs 2017-11-14 14:11:57 -06:00
parent 0d15898f58
commit 318e873481
3 changed files with 30 additions and 3 deletions

15
NEWS.md
View File

@ -3,6 +3,21 @@
This file will contain a list of notable changes for each release. Note
the information in this file is in reverse order.
## OpenRC 0.35
Consider this your second notification with regard to /etc/mtab being a
file instead of a symbolic link.
In this version, the mtab service will complain loudly if you have
mtab_is_file set to yes and recommend that you change this to no and
restart the mtab service to migrate /etc/mtab to a symbolic link.
If there is a valid technical reason to keep /etc/mtab as a flat file
instead of a symbolic link to /proc/self/mounts, we are interested and
we will keep the support in that case. Please open an issue and let us
know however. Otherwise, consider this your final notice that the mtab
service will be removed in the future.
## OpenRC 0.33
This version removes the "service" binary which was just a copy of

View File

@ -1,5 +1,13 @@
# As far as we are aware, there are no modern linux tools or use cases
# which require /etc/mtab to be a separate file from /proc/self/mounts,
# so this setting should be commented out.
# If it is set to yes, please comment it out and run this command:
# # rc-service mtab restart
# In the future, the mtab service will be removed since we are not aware
# of any need to manipulate /etc/mtab as a separate file from
# /proc/self/mounts.
# If you have a technical reason we should keep this support, please
# open an issue at https://github.com/openrc/openrc/issues and let us
# know about your situation.
# This setting controls whether /etc/mtab is a file or symbolic link.
# Most of the time, you shouldn't touch this. However, if the default
# breaks your system in some way, please see the NEWS.md file that comes
# with OpenRC for the actions to take.
# mtab_is_file=no

View File

@ -31,6 +31,10 @@ start()
einfo "Creating mtab symbolic link"
ln -snf /proc/self/mounts /etc/mtab
else
ewarn "The ${RC_SVCNAME} service will be removed in the future."
ewarn "Please change the mtab_is_file setting to no and run"
ewarn "# rc-service mtab restart"
ewarn "to create the mtab symbolic link."
[ -L /etc/mtab ] && ewarn "Removing /etc/mtab symbolic link"
rm -f /etc/mtab
einfo "Creating mtab file"