Changeset d47ba250


Ignore:
Timestamp:
09/05/13 06:31:55 (14 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
7f4794d
Parents:
04630fb
Message:

Fix an issue with pc-fbsdupdatecheck and the Updater GUI

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-updategui/mainWin.cpp

    r53791e4 rd47ba250  
    553553  QProcess f; 
    554554  if ( wDir.isEmpty() ) 
    555      f.start(QString("pc-fbsdupdatecheck"), QStringList()); 
     555     f.start(QString("pc-fbsdupdatecheck"), QStringList() << "update" ); 
    556556  else { 
    557557     QProcess::execute("cp /usr/local/bin/pc-fbsdupdatecheck " + wDir + "/tmp/.fbupdatechk"); 
    558558     QProcess::execute("chmod 755 " + wDir + "/tmp/.fbupdatechk"); 
    559      f.start(QString("chroot"), QStringList() << wDir << "/tmp/.fbupdatechk" << "fetch" ); 
     559     f.start(QString("chroot"), QStringList() << wDir << "/tmp/.fbupdatechk" << "update" ); 
    560560  } 
    561561  while(f.state() == QProcess::Starting || f.state() == QProcess::Running) 
  • src-sh/pc-fbsdupdatecheck/main.c

    r1db1c9b rd47ba250  
    77#include <unistd.h> 
    88 
    9 int main() 
     9int main(int argc, char ** argv) 
    1010{ 
    11         system("touch /tmp/.fbsdup-lock"); 
    12         system("mkdir /var/db/freebsd-update-check 2>/dev/null"); 
    13         system("cat /usr/sbin/freebsd-update | sed 's|! -t 0|-z '1'|g' | /bin/sh -s 'fetch' '-d' '/var/db/freebsd-update-check'"); 
    14         system("rm /tmp/.fbsdup-lock"); 
    15         return 0; 
     11  if ( argc == 2 ) { 
     12    if ( strcmp(argv[1], "update") != 0 ) 
     13    { 
     14       printf("Invalid option!"); 
     15       return 1; 
     16    } 
     17    // Fetch to the standard working-dir 
     18    system("touch /tmp/.fbsdup-lock"); 
     19    system("cat /usr/sbin/freebsd-update | sed 's|! -t 0|-z '1'|g' | /bin/sh -s 'fetch'"); 
     20    system("rm /tmp/.fbsdup-lock"); 
     21    return 0; 
     22  } else { 
     23    system("touch /tmp/.fbsdup-lock"); 
     24    system("mkdir /var/db/freebsd-update-check 2>/dev/null"); 
     25    system("cat /usr/sbin/freebsd-update | sed 's|! -t 0|-z '1'|g' | /bin/sh -s 'fetch' '-d' '/var/db/freebsd-update-check'"); 
     26    system("rm /tmp/.fbsdup-lock"); 
     27    return 0; 
     28  } 
    1629} 
Note: See TracChangeset for help on using the changeset viewer.