dbus_error_init(&error);
+ /* We don't take mount requests anymore if we are supposed to
+ * shut down anyway */
+ if (a->meta.job && a->meta.job->type == JOB_STOP) {
+ automount_send_ready(a, -EHOSTDOWN);
+ return;
+ }
+
mkdir_p(a->where, a->directory_mode);
/* Before we do anything, let's see if somebody is playing games with us? */
close_nointr_nofail(m->dev_autofs_fd);
}
+static void automount_reset_maintenance(Unit *u) {
+ Automount *a = AUTOMOUNT(u);
+
+ assert(a);
+
+ if (a->state == AUTOMOUNT_MAINTENANCE)
+ automount_set_state(a, AUTOMOUNT_DEAD);
+
+ a->failure = false;
+}
+
static const char* const automount_state_table[_AUTOMOUNT_STATE_MAX] = {
[AUTOMOUNT_DEAD] = "dead",
[AUTOMOUNT_WAITING] = "waiting",
.fd_event = automount_fd_event,
+ .reset_maintenance = automount_reset_maintenance,
+
.bus_message_handler = bus_automount_message_handler,
.shutdown = automount_shutdown