]> err.no Git - systemd/commitdiff
automount: use unit_pending_inactive() where appropriate
authorLennart Poettering <lennart@poettering.net>
Wed, 26 Jan 2011 01:55:35 +0000 (02:55 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 26 Jan 2011 01:55:35 +0000 (02:55 +0100)
src/automount.c
src/socket.c

index 0ae467cbd4f79a8fc005d78e05f0cbfd686c7e3c..9447c0d8fcf81af7c3c3a169bc4bccd70741ca90 100644 (file)
@@ -573,7 +573,8 @@ static void automount_enter_runnning(Automount *a) {
 
         /* 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) {
+        if (unit_pending_inactive(UNIT(a))) {
+                log_debug("Suppressing automount request on %s since unit stop is scheduled.", a->meta.id);
                 automount_send_ready(a, -EHOSTDOWN);
                 return;
         }
index 4443dba0c991b46a51cbd9140d26119127d0ac5c..e386c7f2971c7cbe9cd0c4749bc9ee80a05c506b 100644 (file)
@@ -1189,6 +1189,8 @@ static void socket_enter_running(Socket *s, int cfd) {
         /* We don't take connections anymore if we are supposed to
          * shut down anyway */
         if (unit_pending_inactive(UNIT(s))) {
+                log_debug("Suppressing connection request on %s since unit stop is scheduled.", s->meta.id);
+
                 if (cfd >= 0)
                         close_nointr_nofail(cfd);
                 else  {