diff --git a/backup-daemon/mybackupmanager.cpp b/backup-daemon/mybackupmanager.cpp index e044d6c..1bf317a 100755 --- a/backup-daemon/mybackupmanager.cpp +++ b/backup-daemon/mybackupmanager.cpp @@ -500,6 +500,8 @@ void MyBackupManager::setKysecStatus(bool status) // 安全保护已开启 m_bOpenKysec = true; Utils::setKysecStatus(false); + // 停止安全防护 + QProcess::execute("systemctl stop kysec-init.service"); } else { m_bOpenKysec = false; } @@ -507,6 +509,8 @@ void MyBackupManager::setKysecStatus(bool status) if(Utils::isRunning("kysec-sync-daemon")){ m_bStartKysecDeamon = true; Utils::setKysecDaemon(false); + // 停止安全防护 + QProcess::execute("systemctl stop kysec-init.service"); } else { m_bStartKysecDeamon = false; } diff --git a/backup-daemon/myprocess/calcbackupsize.cpp b/backup-daemon/myprocess/calcbackupsize.cpp index e0a6a9a..1fd5ea3 100755 --- a/backup-daemon/myprocess/calcbackupsize.cpp +++ b/backup-daemon/myprocess/calcbackupsize.cpp @@ -1,5 +1,6 @@ #include "calcbackupsize.h" #include +#include CalcBackupSize::CalcBackupSize(QObject* parent) : QObject(parent), diff --git a/backup-daemon/systemrestoreproxy.cpp b/backup-daemon/systemrestoreproxy.cpp index 879922e..1ffd7cc 100755 --- a/backup-daemon/systemrestoreproxy.cpp +++ b/backup-daemon/systemrestoreproxy.cpp @@ -319,8 +319,8 @@ QStringList SystemRestoreProxy::getRsyncArgs(SystemRestoreScene scene) */ void SystemRestoreProxy::restoreSystem() { - // 停止安全防护 - QProcess::execute("systemctl stop kysec-init.service"); + // 停止安全防护, 迁移到业务开始的锁定中去 + // QProcess::execute("systemctl stop kysec-init.service"); // 本地系统备份没有img挂载,故下面两个路径相等 m_srcPath = m_backupPath; diff --git a/backup-daemon/udisksystemrestoreproxy.cpp b/backup-daemon/udisksystemrestoreproxy.cpp index d041ba9..f115d1f 100755 --- a/backup-daemon/udisksystemrestoreproxy.cpp +++ b/backup-daemon/udisksystemrestoreproxy.cpp @@ -358,8 +358,8 @@ bool UDiskSystemRestoreProxy::doPrepare() */ void UDiskSystemRestoreProxy::restoreSystem() { - // 停止安全防护 - QProcess::execute("systemctl stop kysec-init.service"); + // 停止安全防护, 迁移到业务开始的锁定中去 + // QProcess::execute("systemctl stop kysec-init.service"); QString destPath = Utils::getSysRootPath();