Compare commits
2 Commits
da0fa54d28
...
201a1cbab9
Author | SHA1 | Date | |
---|---|---|---|
201a1cbab9 | |||
9a9cce126a |
UpdatePTUDevCtrl
@ -420,10 +420,17 @@ std::optional<QString> GitClient::gitPull() {
|
||||
X11 forwarding is disabled to avoid man-in-the-middle attacks.
|
||||
Already up to date.
|
||||
|
||||
This first part is from ssh itself, and could not be fetched easily, as this
|
||||
process is gone when git itself starts.
|
||||
This first part is from ssh itself. Only the last line is the git message.
|
||||
|
||||
Only the last line is the git message.
|
||||
Here an output of running ATBUpdateTool with a corrupted known-hosts-file:
|
||||
|
||||
...
|
||||
Oct 23 14:18:18 ATB_PTU5 ATBUpdateTool[2696]: ( branchExistsRemotely : 310 ) branch "zg1/zone1" EXISTS REMOTELY. ( "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\nIT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\r\nSomeone could be eavesdropping on you right now (man-in-the-middle attack)!\r\nIt is also possible that a host key has just been changed.\r\nThe fingerprint for the ECDSA key sent by the remote host is\nSHA256:vOD5jF2hglGktqLhK9ABxfEjwEgIK68/v9erdT05NDQ.\r\nPlease contact your system administrator.\r\nAdd correct host key in /home/root/.ssh/known_hosts to get rid of this message.\r\nOffending ECDSA key in /home/root/.ssh/known_hosts:1\r\nPassword authentication is disabled to avoid man-in-the-middle attacks.\r\nKeyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.\r\nAgent forwarding is disabled to avoid man-in-the-middle attacks.\r\nX11 forwarding is disabled to avoid man-in-the-middle attacks.\r\nbd4e8da4780b1a7d6be3d3ce8419f43ccf7e706f\trefs/heads/zg1/zone1" )
|
||||
Oct 23 14:18:18 ATB_PTU5 ATBUpdateTool[2696]: EXECUTED "git branch -l" "(runtime 16ms)" with code 0 IN "/opt/app/tools/atbupdate/customer_336"
|
||||
Oct 23 14:18:18 ATB_PTU5 ATBUpdateTool[2696]: "UPDATE_STEP::PULL_NEW_BRANCH"
|
||||
Oct 23 14:18:18 ATB_PTU5 ATBUpdateTool[2696]: "BRANCH-NAME zg1/zone1 CONTAINED IN RESULT master\n* zg1/zone1" .....
|
||||
|
||||
The download continues.
|
||||
#endif
|
||||
Command c("git pull");
|
||||
if (c.execute(m_customerRepository)) {
|
||||
|
@ -456,6 +456,14 @@ void Worker::privateUpdate() {
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
if ((continueUpdate = customerEnvironment()) == false) {
|
||||
// even if something goes wrong creating the environment, try to execute
|
||||
// opkg_commands
|
||||
if (QDir(m_customerRepository).exists()) {
|
||||
// always execute contents of opkg_commands-file
|
||||
m_filesToUpdate.clear();
|
||||
m_filesToUpdate << "etc/psa_update/opkg_commands";
|
||||
execOpkgCommands();
|
||||
}
|
||||
return;
|
||||
}
|
||||
m_versionInfo = m_gc.gitShowReason(m_branchName);
|
||||
@ -470,6 +478,14 @@ void Worker::privateUpdate() {
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
if ((continueUpdate = filesToUpdate()) == false) {
|
||||
// even if something goes wrong in filesToUpdate, try to execute
|
||||
// opkg_commands
|
||||
if (QDir(m_customerRepository).exists()) {
|
||||
// always execute contents of opkg_commands-file
|
||||
m_filesToUpdate.clear();
|
||||
m_filesToUpdate << "etc/psa_update/opkg_commands";
|
||||
execOpkgCommands();
|
||||
}
|
||||
return;
|
||||
}
|
||||
m_versionInfo = m_gc.gitShowReason(m_branchName);
|
||||
@ -483,6 +499,14 @@ void Worker::privateUpdate() {
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
if ((continueUpdate = syncCustomerRepositoryAndFS()) == false) {
|
||||
// even if something goes wrong with rsync, try to execute
|
||||
// opkg_commands
|
||||
if (QDir(m_customerRepository).exists()) {
|
||||
// always execute contents of opkg_commands-file
|
||||
m_filesToUpdate.clear();
|
||||
m_filesToUpdate << "etc/psa_update/opkg_commands";
|
||||
execOpkgCommands();
|
||||
}
|
||||
return;
|
||||
}
|
||||
lst = QStringList(QString(smap[UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS]));
|
||||
|
Loading…
Reference in New Issue
Block a user