Commit 26aec743 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Some adaptations for Harmattan.

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