Pablo Greco 48fc63
From 4b125d957a082250b83ff1bff775edefe90356de Mon Sep 17 00:00:00 2001
Pablo Greco 48fc63
From: David Tardon <dtardon@redhat.com>
Pablo Greco 48fc63
Date: Mon, 19 Nov 2018 15:58:27 +0100
Pablo Greco 48fc63
Subject: [PATCH] set automount state to waiting when the mount is stopped
Pablo Greco 48fc63
Pablo Greco 48fc63
Resolves: #1651257
Pablo Greco 48fc63
---
Pablo Greco 48fc63
 src/core/automount.c | 2 ++
Pablo Greco 48fc63
 1 file changed, 2 insertions(+)
Pablo Greco 48fc63
Pablo Greco 48fc63
diff --git a/src/core/automount.c b/src/core/automount.c
Pablo Greco 48fc63
index f57782b9b8..4678bdc7c9 100644
Pablo Greco 48fc63
--- a/src/core/automount.c
Pablo Greco 48fc63
+++ b/src/core/automount.c
Pablo Greco 48fc63
@@ -523,6 +523,8 @@ int automount_update_mount(Automount *a, MountState old_state, MountState state)
Pablo Greco 48fc63
                 if (old_state != state)
Pablo Greco 48fc63
                         automount_send_ready(a, a->tokens, -ENODEV);
Pablo Greco 48fc63
                 (void) sd_event_source_set_enabled(a->expire_event_source, SD_EVENT_OFF);
Pablo Greco 48fc63
+                if (a->state == AUTOMOUNT_RUNNING)
Pablo Greco 48fc63
+                        automount_set_state(a, AUTOMOUNT_WAITING);
Pablo Greco 48fc63
                 break;
Pablo Greco 48fc63
         default:
Pablo Greco 48fc63
                 break;