[gdm/gnome-3-6] slave: remove initial-setup trigger file when finished



commit 571ea34ff6c8c9f3896b519f4a0276d69898924d
Author: Ray Strode <rstrode redhat com>
Date:   Wed Oct 3 10:55:13 2012 -0400

    slave: remove initial-setup trigger file when finished
    
    gnome-initial-setup knows whether or not to run by looking
    for the existence of a trigger filed called
    
    /var/lib/gdm/run-initial-setup
    
    This commit ensures that file gets cleaned up after the initial setup
    process completes.

 daemon/gdm-simple-slave.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index b0c5e5f..2e0b68b 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -65,6 +65,7 @@
 #define DEFAULT_PING_INTERVAL 15
 
 #define INITIAL_SETUP_USERNAME "gnome-initial-setup"
+#define INITIAL_SETUP_TRIGGER_FILE LOCALSTATEDIR "/lib/gdm/run-initial-setup"
 
 struct GdmSimpleSlavePrivate
 {
@@ -1209,6 +1210,10 @@ destroy_initial_setup_user (GdmSimpleSlave *slave)
                 }
                 g_object_unref (user);
         }
+
+        if (g_remove (INITIAL_SETUP_TRIGGER_FILE) < 0) {
+                g_warning ("Failed to remove '%s': %s", INITIAL_SETUP_TRIGGER_FILE, g_strerror (errno));
+        }
 }
 
 static void
@@ -1229,8 +1234,6 @@ wants_autologin (GdmSimpleSlave *slave)
         return enabled && delay == 0;
 }
 
-#define INITIAL_SETUP_TRIGGER_FILE LOCALSTATEDIR "/lib/gdm/run-initial-setup"
-
 static gboolean
 wants_initial_setup (GdmSimpleSlave *slave)
 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]