|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
commit ed649206be1dcc13e8bb57518b7d0a3294394104
|
|
|
|
|
# Calculate format=diff
|
|
|
|
|
commit b89c317d40d7ce78c811b4ef463c0dcf47f61003
|
|
|
|
|
Author: Mike Khiretskiy <mh@calculate.ru>
|
|
|
|
|
Date: Fri Oct 2 13:24:08 2015 +0300
|
|
|
|
|
|
|
|
|
@ -71,7 +72,7 @@ index 584f26b..ef433be 100644
|
|
|
|
|
"The lowest virtual terminal number that will be used."));
|
|
|
|
|
);
|
|
|
|
|
diff --git src/helper/HelperApp.cpp src/helper/HelperApp.cpp
|
|
|
|
|
index a3f9430..5da98fa 100644
|
|
|
|
|
index a3f9430..94308e6 100644
|
|
|
|
|
--- src/helper/HelperApp.cpp
|
|
|
|
|
+++ src/helper/HelperApp.cpp
|
|
|
|
|
@@ -18,6 +18,7 @@
|
|
|
|
@ -94,11 +95,12 @@ index a3f9430..5da98fa 100644
|
|
|
|
|
if (!m_session->path().isEmpty()) {
|
|
|
|
|
env.insert(m_session->processEnvironment());
|
|
|
|
|
m_session->setProcessEnvironment(env);
|
|
|
|
|
@@ -144,7 +150,31 @@ namespace SDDM {
|
|
|
|
|
@@ -144,7 +150,30 @@ namespace SDDM {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+ bool HelperApp::runExternalScript(const QString &command) {
|
|
|
|
|
+ bool ret = true;
|
|
|
|
|
+ QProcessEnvironment env = authenticated(m_user);
|
|
|
|
|
+ env.insert(m_session->processEnvironment());
|
|
|
|
|
+ if (!command.isEmpty() &&
|
|
|
|
@ -109,15 +111,13 @@ index a3f9430..5da98fa 100644
|
|
|
|
|
+ displayStopScript->setProcessEnvironment(env);
|
|
|
|
|
+ // start script
|
|
|
|
|
+ displayStopScript->start(command);
|
|
|
|
|
+ if(!displayStopScript->waitForFinished(-1)) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(displayStopScript->exitCode() != 0) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ if(!displayStopScript->waitForFinished(-1) ||
|
|
|
|
|
+ displayStopScript->exitCode() != 0) {
|
|
|
|
|
+ ret = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ displayStopScript->deleteLater();
|
|
|
|
|
+ }
|
|
|
|
|
+ return true;
|
|
|
|
|
+ return ret;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
void HelperApp::sessionFinished(int status) {
|
|
|
|
|