[gdm/wip/initial-setup] Add a marker file to request initial-setup
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/wip/initial-setup] Add a marker file to request initial-setup
- Date: Thu, 19 May 2011 13:28:10 +0000 (UTC)
commit bb41a3c59c1c6d747e7f6be72ba06f862eefc90d
Author: Matthias Clasen <mclasen redhat com>
Date: Thu May 19 09:26:31 2011 -0400
Add a marker file to request initial-setup
The InitialSetupEnabled key in the configuration is now used
to control whether the initial-setup feature is enabled at all.
To actually run the initial-setup, you need to touch
/etc/gdm/do-initial-setup.
Still to do: remove the file after initial setup has run.
daemon/gdm-simple-slave.c | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index 2ec058d..d54e7ef 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -1407,24 +1407,30 @@ idle_connect_to_display (GdmSimpleSlave *slave)
res = gdm_slave_connect_to_x11_display (GDM_SLAVE (slave));
if (res) {
- gboolean enabled;
- int delay;
+ gboolean timed_login_enabled;
+ int timed_login_delay;
gboolean initial_setup_enabled;
+ gboolean initial_setup_requested;
+ const gchar *filename;
/* FIXME: handle wait-for-go */
setup_server (slave);
initial_setup_enabled = FALSE;
+ initial_setup_requested = FALSE;
gdm_slave_get_initial_setup_details (GDM_SLAVE (slave), &initial_setup_enabled);
-
- delay = 0;
- enabled = FALSE;
- gdm_slave_get_timed_login_details (GDM_SLAVE (slave), &enabled, NULL, &delay);
- if (initial_setup_enabled) {
+ filename = GDMCONFDIR "/run-initial-setup";
+ if (g_file_test (filename, G_FILE_TEST_EXISTS))
+ initial_setup_requested = TRUE;
+
+ timed_login_delay = 0;
+ timed_login_enabled = FALSE;
+ gdm_slave_get_timed_login_details (GDM_SLAVE (slave), &timed_login_enabled, NULL, &timed_login_delay);
+ if (initial_setup_enabled && initial_setup_requested) {
start_initial_setup (slave);
create_new_session (slave);
- } else if (! enabled || delay > 0) {
+ } else if (! timed_login_enabled || timed_login_delay > 0) {
start_greeter (slave);
create_new_session (slave);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]