]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mount: ignore autofs entries in mount listing
authorIan Kent <raven@themaw.net>
Mon, 13 Mar 2023 01:43:02 +0000 (09:43 +0800)
committerKarel Zak <kzak@redhat.com>
Wed, 15 Mar 2023 14:26:43 +0000 (15:26 +0100)
Since we can't enable use of ignoring autofs mounts that have the
"ignore" option present by default (systemd could get confused) it's
necessary to enable it for individual applications.

The mount utility is one applcation we need it for so enable it.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: John Westerdale <jwesterd@redhat.com>
Cc: Frank Hertz <fhirtz@redhat.com>
Cc: Frank Sorenson <fsorenso@redhat.com>
sys-utils/mount.c

index 6590272c7dec6b42e6727dff5da7e145f873b2f2..dba6fcae9295300289c323fb2db433fd5c536488 100644 (file)
@@ -124,6 +124,8 @@ static void print_all(struct libmnt_context *cxt, char *pattern, int show_label)
        struct libmnt_fs *fs;
        struct libmnt_cache *cache = NULL;
 
+       mnt_context_enable_noautofs(cxt, 1);
+
        if (mnt_context_get_mtab(cxt, &tb))
                err(MNT_EX_SYSERR, _("failed to read mtab"));