Permalink
Browse files

Merge branch 'master' of github.com:pcbsd/pcbsd

  • Loading branch information...
2 parents f54df3c + 82ea8a6 commit 0dd24a80307c0fbeacc57136665c24468b02f638 @kmoore134 kmoore134 committed Oct 9, 2013
@@ -337,9 +337,12 @@ void UpdaterTray::slotStartUpdateCheck()
qDebug() << "Starting System Update Check";
//Check for installed system updates needing computer to restart to finish
- bool needRestart = false;
- if( QFile::exists("/usr/local/tmp/update-stagedir/doupdate.sh") ){
- needRestart = true;
+ if ( QFile::exists("/tmp/.fbsdup-reboot") ) {
+ programstatus = SYSTEM_RESTART_NEEDED;
+ contextMenuRefresh();
+ displayTooltip();
+ doingCheck=false;
+ return;
}
bool haveUp = false;
@@ -432,9 +435,7 @@ void UpdaterTray::slotStartUpdateCheck()
}
/////////////////////////////////////////////
- if ( needRestart ) {
- programstatus = SYSTEM_RESTART_NEEDED;
- } else if ( haveUp ) {
+ if ( haveUp ) {
programstatus = SYSTEM_UPDATE_AVAIL;
} else if ( haveNGUp ) {
programstatus = PACKAGE_UPDATE_AVAIL;
@@ -238,6 +238,7 @@ void mainWin::slotUpdateLoop()
if ( wDir.isEmpty() ) {
if ( listUpdates.at(z).at(1) == "FBSDUPDATE" ) {
uProc->start("freebsd-update", QStringList() << "install");
+ system("touch /tmp/.fbsdup-reboot");
} else {
uProc->start("pc-updatemanager", QStringList() << "install" << tag );
}
@@ -356,6 +357,12 @@ void mainWin::slotRescanUpdates()
groupDetails->setVisible(false);
groupUpdates->setEnabled(false);
listUpdates.clear();
+
+ if ( QFile::exists("/tmp/.fbsdup-reboot") ) {
+ textLabel->setText(tr("Reboot required for update to finish!"));
+ return;
+ }
+
textLabel->setText(tr("Checking for updates... Please Wait..."));
slotReadUpdateData();
slotDisplayUpdates();
@@ -544,6 +551,11 @@ void mainWin::checkFBSDUpdates() {
QString line, toPatchVer, tmp;
QStringList up, listDesc, listPkgs;
+ if ( QFile::exists("/tmp/.fbsdup-reboot") ) {
+ qDebug() << "Skipping update check - Waiting for reboot";
+ return;
+ }
+
if ( QFile::exists("/tmp/.fbsdup-lock") ) {
qDebug() << "Skipping update check - freebsd-update is running elsewhere";
return;
@@ -451,6 +451,9 @@ start_major_fbsd_update() {
exit_err "Failed running \"freebsd-update -r $rel upgrade\"..."
fi
+ # Touch our marker that we will need to reboot before doing other updates
+ touch /tmp/.fbsdup-reboot
+
# Now install freebsd-update files
freebsd-update --non-interactive install
if [ $? -ne 0 ] ; then

0 comments on commit 0dd24a8

Please sign in to comment.