Skip to content
Snippets Groups Projects
Commit 26aec743 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Some adaptations for Harmattan.

Reviewed-by: kh1
parent 0a85b90d
No related branches found
No related tags found
No related merge requests found
...@@ -227,9 +227,9 @@ void MaemoDeployStep::stop() ...@@ -227,9 +227,9 @@ void MaemoDeployStep::stop()
if (remoteProcessRunning) { if (remoteProcessRunning) {
const QByteArray programToKill const QByteArray programToKill
= m_currentDeviceDeployAction ? "cp" : "dpkg"; = m_currentDeviceDeployAction ? "/bin/cp" : "/usr/bin/dpkg";
const QByteArray cmdLine = "pkill -x " + programToKill const QByteArray cmdLine = "pkill " + programToKill
+ "; sleep 1; pkill -x -9 " + programToKill; + "; sleep 1; pkill -9 " + programToKill;
SshRemoteProcess::Ptr killProc SshRemoteProcess::Ptr killProc
= m_connection->createRemoteProcess(cmdLine); = m_connection->createRemoteProcess(cmdLine);
killProc->start(); killProc->start();
......
...@@ -48,8 +48,8 @@ QString MaemoGlobal::remoteSudo() ...@@ -48,8 +48,8 @@ QString MaemoGlobal::remoteSudo()
QString MaemoGlobal::remoteCommandPrefix(const QString &commandFilePath) QString MaemoGlobal::remoteCommandPrefix(const QString &commandFilePath)
{ {
return QString::fromLocal8Bit("%1 chmod a+x %2 && source /etc/profile && DISPLAY=:0.0 ") return QString::fromLocal8Bit("%1 chmod a+x %2 && source /etc/profile; "
.arg(remoteSudo()).arg(commandFilePath); "source /home/user/.profile; ").arg(remoteSudo(), commandFilePath);
} }
QString MaemoGlobal::remoteEnvironment(const QList<ProjectExplorer::EnvironmentItem> &list) QString MaemoGlobal::remoteEnvironment(const QList<ProjectExplorer::EnvironmentItem> &list)
......
...@@ -144,8 +144,8 @@ void MaemoSshRunner::cleanup(bool initialCleanup) ...@@ -144,8 +144,8 @@ void MaemoSshRunner::cleanup(bool initialCleanup)
QString niceKill; QString niceKill;
QString brutalKill; QString brutalKill;
foreach (const QString &proc, m_procsToKill) { foreach (const QString &proc, m_procsToKill) {
niceKill += QString::fromLocal8Bit("pkill -x %1;").arg(proc); niceKill += QString::fromLocal8Bit("pkill %1\\$;").arg(proc);
brutalKill += QString::fromLocal8Bit("pkill -x -9 %1;").arg(proc); brutalKill += QString::fromLocal8Bit("pkill -9 %1\\$;").arg(proc);
} }
QString remoteCall = niceKill + QLatin1String("sleep 1; ") + brutalKill; QString remoteCall = niceKill + QLatin1String("sleep 1; ") + brutalKill;
remoteCall.remove(remoteCall.count() - 1, 1); // Get rid of trailing semicolon. remoteCall.remove(remoteCall.count() - 1, 1); // Get rid of trailing semicolon.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment