There are times when it is necessary to update the UUID on a mounted
root file system (for example). So when we add this this safety check
to e2fsprogs 1.43, we will likely break some scripts. Allow the -f
option to force an override of this safety check.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Changing the UUID requires rewriting all metadata,
* which can race with a mounted fs. Don't allow that.
*/
- if (mount_flags & EXT2_MF_MOUNTED) {
+ if ((mount_flags & EXT2_MF_MOUNTED) && !f_flag) {
fputs(_("The UUID may only be "
"changed when the filesystem is "
"unmounted.\n"), stderr);