[systemd-commits] src/shutdown.c

Kay Sievers kay at kemper.freedesktop.org
Sat Jul 30 11:27:34 PDT 2011


 src/shutdown.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit a27d2184164e1b2522971246da4d803083f96072
Author: Kay Sievers <kay.sievers at vrfy.org>
Date:   Sat Jul 30 20:24:40 2011 +0200

    shutdownd: add 'success message' if we retried detaching stuff
    
    If we need to retry, we print things like
      'Not all file systems unmounted, 1 left'
    We should also print something after we succeeded, so we don't leave
    the impression we left stuff behind.

diff --git a/src/shutdown.c b/src/shutdown.c
index 6714927..52bad21 100644
--- a/src/shutdown.c
+++ b/src/shutdown.c
@@ -384,9 +384,12 @@ int main(int argc, char *argv[]) {
                                 log_error("Failed to detach DM devices: %s", strerror(-r));
                 }
 
-                if (!need_umount && !need_swapoff && !need_loop_detach && !need_dm_detach)
+                if (!need_umount && !need_swapoff && !need_loop_detach && !need_dm_detach) {
+                        if (retries > 0)
+                                log_info("All filesystems, swaps, loop devices, DM devices detached.");
                         /* Yay, done */
                         break;
+                }
 
                 /* If in this iteration we didn't manage to
                  * unmount/deactivate anything, we either kill more



More information about the systemd-commits mailing list