source: src-sh/pc-fbsdupdatecheck/main.c @ 53791e4

9.2-releasereleng/10.0releng/10.0.1
Last change on this file since 53791e4 was 53791e4, checked in by Kris Moore <kris@…>, 9 months ago

Add a better system of locking when GUIs can run freebsd-update, this will prevent
some messed up situations where a current freebsd-update is being screwed up by another
running process.

  • Property mode set to 100644
File size: 326 bytes
Line 
1#include <sys/types.h>
2#include <sys/fcntl.h>
3#include <err.h>
4#include <stdlib.h>
5#include <stdio.h>
6#include <string.h>
7#include <unistd.h>
8
9int main()
10{
11        system("touch /tmp/.fbsdup-lock");
12        system("cat /usr/sbin/freebsd-update | sed 's|! -t 0|-z '1'|g' | /bin/sh -s 'fetch'");
13        system("rm /tmp/.fbsdup-lock");
14        return 0;
15}
Note: See TracBrowser for help on using the repository browser.