source: src-sh/pc-fbsdupdatecheck/main.c @ 1db1c9b

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2
Last change on this file since 1db1c9b was 1db1c9b, checked in by Kris Moore <kris@…>, 12 months ago

Use a different working dir when checking for updates on this tray,
to avoid collisions with other instances of "freebsd-update"

  • Property mode set to 100644
File size: 428 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("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;
16}
Note: See TracBrowser for help on using the repository browser.