[PC-BSD Commits] r6509 - pcbsd/trunk/SysInstaller
svn at pcbsd.org
svn at pcbsd.org
Tue Apr 6 06:56:05 PDT 2010
Author: kris
Date: 2010-04-06 06:56:05 -0700 (Tue, 06 Apr 2010)
New Revision: 6509
Modified:
pcbsd/trunk/SysInstaller/backend.cpp
pcbsd/trunk/SysInstaller/backend.h
pcbsd/trunk/SysInstaller/dialogSelectNet.cpp
pcbsd/trunk/SysInstaller/sysinstaller.ui
Log:
Update to SysInstaller, make our backend a bit nicer for a few longer external process calls,
keep updating GUI during this time. Also don't timeout when reading rsync backup list, since that
can take a minute or two from a remote server.
Modified: pcbsd/trunk/SysInstaller/backend.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/backend.cpp 2010-04-06 12:43:31 UTC (rev 6508)
+++ pcbsd/trunk/SysInstaller/backend.cpp 2010-04-06 13:56:05 UTC (rev 6509)
@@ -1,5 +1,7 @@
#include "backend.h"
+#include <QApplication>
+
using namespace Scripts;
void Backend::createErrorReport()
@@ -81,6 +83,9 @@
QStringList backupList;
Process p(QStringList() << "list-rsync-backups" << User << Host << Port);
+ while(p.state() == QProcess::Starting || p.state() == QProcess::Running)
+ QCoreApplication::processEvents();
+
if (p.waitForFinished()) {
while (p.canReadLine()) {
line = p.readLine().simplified();
@@ -105,6 +110,8 @@
Mirrors = "OFF";
Process p(QStringList() << "enable-net" << Nic << IP << NetMask << DNS << Gate << Mirrors);
+ while(p.state() == QProcess::Starting || p.state() == QProcess::Running)
+ QCoreApplication::processEvents();
if (p.waitForFinished()) {
while (p.canReadLine()) {
qDebug() << "Enable Nic: " << p.readLine().simplified();
Modified: pcbsd/trunk/SysInstaller/backend.h
===================================================================
--- pcbsd/trunk/SysInstaller/backend.h 2010-04-06 12:43:31 UTC (rev 6508)
+++ pcbsd/trunk/SysInstaller/backend.h 2010-04-06 13:56:05 UTC (rev 6509)
@@ -8,6 +8,7 @@
#include <QDebug>
#include <QProcess>
#include <QByteArray>
+#include <QWidget>
#define PCSYSINSTALL QString("/PCBSD/pc-sysinstall/pc-sysinstall")
#define PCSYSINSTALLDIR QString("/PCBSD/pc-sysinstall")
Modified: pcbsd/trunk/SysInstaller/dialogSelectNet.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/dialogSelectNet.cpp 2010-04-06 12:43:31 UTC (rev 6508)
+++ pcbsd/trunk/SysInstaller/dialogSelectNet.cpp 2010-04-06 13:56:05 UTC (rev 6509)
@@ -70,9 +70,11 @@
{
if ( usingRsync) {
// Lets enable the NIC, and fetch our backup listing
+ labelStatus->setText(tr("Enabling NIC..."));
Scripts::Backend::enableNic(Nic, IP, Netmask, DNS, Gate, false);
Scripts::Backend::setupSSHKeys(Host, User, Port);
comboMirror->clear();
+ labelStatus->setText(tr("Fetching backup list, this may take a while..."));
comboMirror->addItems(Scripts::Backend::listRsyncBackups(Host, User, Port));
comboMirror->setEnabled(TRUE);
pushCancel->setEnabled(TRUE);
@@ -83,6 +85,7 @@
} else {
// Enable the NIC, and fetch mirror listing
+ labelStatus->setText(tr("Enabling NIC..."));
Scripts::Backend::enableNic(Nic, IP, Netmask, DNS, Gate, true);
radioInternet->setEnabled(true);
Modified: pcbsd/trunk/SysInstaller/sysinstaller.ui
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.ui 2010-04-06 12:43:31 UTC (rev 6508)
+++ pcbsd/trunk/SysInstaller/sysinstaller.ui 2010-04-06 13:56:05 UTC (rev 6509)
@@ -6048,7 +6048,7 @@
</font>
</property>
<property name="text">
- <string>Enter your Life-Preserver settings:</string>
+ <string>Enter your rsync backup settings:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
More information about the Commits
mailing list