[gnome-continuous] libqa: print out the autologin type



commit 30c4eacb79b89a4b213861c85406bcc56a0459cd
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Fri Mar 6 16:11:41 2015 +0100

    libqa: print out the autologin type

 src/js/libqa.js |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/js/libqa.js b/src/js/libqa.js
index f4feb90..f8545a9 100644
--- a/src/js/libqa.js
+++ b/src/js/libqa.js
@@ -219,7 +219,7 @@ RateLimitInterval=0\n', null, false, Gio.FileCreateFlags.REPLACE_DESTINATION, ca
 }
 
 function injectTestUserCreation(currentDir, currentEtcDir, username, params, cancellable) {
-    params = Params.parse(params, { password: null, session: null, loginType: null });
+    params = Params.parse(params, { password: null, session: null });
     let passwordCommand, setSessionCommand;
     let commandTemplate = '/usr/bin/dbus-send --print-reply --reply-timeout=60000 --system 
--type=method_call --print-reply' +
         ' --dest=org.freedesktop.Accounts /org/freedesktop/Accounts%s org.freedesktop.Accounts.%s %s'
@@ -258,15 +258,16 @@ function enableAutologin(currentDir, currentEtcDir, username, loginType, cancell
     keyfile.load_from_file(gdmCustomPath.get_path(), GLib.KeyFileFlags.NONE);
     let loginString = null;
     if (loginType === null) {
-        loginString = 'Automatic'
+        loginString = 'Automatic';
     } else {
-        loginString = loginType
+        loginString = loginType;
     }
     keyfile.set_string('daemon', loginString + 'LoginEnable', 'true');
     keyfile.set_string('daemon', loginString + 'Login', username);
-    if (loginType ==  'Timed') {
+    if (loginString == 'Timed') {
         keyfile.set_string('daemon', 'TimedLoginDelay', '10');
     }
+    print("Login type set to '"+loginString+"'");
     keyfile.set_string('debug', 'Enable', 'true');
     gdmCustomPath.replace_contents(keyfile.to_data()[0], null, false, 
Gio.FileCreateFlags.REPLACE_DESTINATION, cancellable);
 }


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