diff options
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | libmount/src/optmap.c | 7 | ||||
-rw-r--r-- | sys-utils/mount.8 | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 08e06ffab..e0240b322 100644 --- a/configure.ac +++ b/configure.ac @@ -1971,6 +1971,7 @@ AS_IF([test "x$with_systemd" != xno], [ [AC_MSG_ERROR([systemd expected but libsystemd not found])], [*:yes], AC_DEFINE([HAVE_LIBSYSTEMD], [1], [Define if libsystemd is available]) + AC_DEFINE([HAVE_SYSTEMD], [1], [Define if systemd should be supported]) ) ]) AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$have_systemd" = xyes]) diff --git a/libmount/src/optmap.c b/libmount/src/optmap.c index 6fdaa7a41..114eb994e 100644 --- a/libmount/src/optmap.c +++ b/libmount/src/optmap.c @@ -160,6 +160,13 @@ static const struct libmnt_optmap userspace_opts_map[] = { "comment=", MNT_MS_COMMENT, MNT_NOHLPS | MNT_NOMTAB },/* fstab comment only */ + /* + * systemd assumes that x-systemd options namespace is available for umount, + * let's use the options as X-* + */ +#ifdef HAVE_SYSTEMD + { "x-systemd", MNT_MS_XPERSIST, MNT_NOHLPS | MNT_PREFIX }, /* like X-* */ +#endif { "X-", MNT_MS_XPERSIST, MNT_NOHLPS | MNT_PREFIX }, /* X- persistent comments (utab) */ { "x-", MNT_MS_XCOMMENT, MNT_NOHLPS | MNT_NOMTAB | MNT_PREFIX }, /* x- fstab only comments */ diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 index 7f45ca7db..36e7ce650 100644 --- a/sys-utils/mount.8 +++ b/sys-utils/mount.8 @@ -1154,6 +1154,10 @@ that maintain mount options in user space is a bad idea, because it's necessary to link all tools that use the options with libmount and there is no guarantee that the options will be always available (for example after a move mount operation or in unshared namespace). + +Note that x-systemd mount options are maintained as X-* options, the rename is +unnecessary to keep existing fstab settings backwardly compatible. + .TP .BR x-mount.mkdir [ = \fImode\fR ] Allow to make a target directory (mountpoint). The optional argument |