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

Fix an issue with pc-fbsdupdatecheck and the Updater GUI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-fbsdupdatecheck/main.c

    r1db1c9b rd47ba25  
    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.