summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-06-11 03:25:18 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-06-11 03:25:18 +0000
commit8db8a379747ee056c46b16e020c29c8a5829e357 (patch)
tree81e2825ca363e3b400b85481997e69efb5f8e1c6 /usr.sbin
parent53c5905b071647ba7a61fb1493f9458f0cc258d9 (diff)
Kernel-implementation of update(8) my me
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/Makefile4
-rw-r--r--usr.sbin/update/Makefile7
-rw-r--r--usr.sbin/update/update.875
-rw-r--r--usr.sbin/update/update.c76
4 files changed, 2 insertions, 160 deletions
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index 8eca7953fa4..478339f8529 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.12 1996/06/04 07:56:00 niklas Exp $
+# $OpenBSD: Makefile,v 1.13 1996/06/11 03:25:16 tholo Exp $
# not yet done: catman
@@ -11,7 +11,7 @@ SUBDIR= ac accton arp bootpd bootpgw bootpef bootptest \
rarpd rbootd rdconfig rdate repquota rmt \
rpc.bootparamd rpc.pcnfsd rwhod \
sa sendmail sliplogin slstats spray sysctl \
- syslogd tcpdump timed traceroute trpt trsp update \
+ syslogd tcpdump timed traceroute trpt trsp \
vipw vnconfig ypbind yppoll ypset \
ypserv zdump zic
diff --git a/usr.sbin/update/Makefile b/usr.sbin/update/Makefile
deleted file mode 100644
index 84dc2dc8c5b..00000000000
--- a/usr.sbin/update/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# from: @(#)Makefile 5.5 (Berkeley) 6/29/90
-# $Id: Makefile,v 1.1 1995/10/18 08:48:30 deraadt Exp $
-
-PROG= update
-MAN= update.8
-
-.include <bsd.prog.mk>
diff --git a/usr.sbin/update/update.8 b/usr.sbin/update/update.8
deleted file mode 100644
index 039142026bf..00000000000
--- a/usr.sbin/update/update.8
+++ /dev/null
@@ -1,75 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)update.8 6.5 (Berkeley) 8/5/91
-.\" $Id: update.8,v 1.1 1995/10/18 08:48:30 deraadt Exp $
-.\"
-.Dd August 5, 1991
-.Dt UPDATE 8
-.Os
-.Sh NAME
-.Nm update
-.Nd flush internal filesystem caches to disk frequently
-.Sh SYNOPSIS
-.Nm update
-.Sh DESCRIPTION
-The
-.Nm update
-command helps protect the integrity of disk volumes
-by flushing
-volatile cached filesystem data
-to disk at thirty second intervals.
-.Nm Update
-uses the
-.Xr sync 2
-function call to do the task.
-.Pp
-.Nm Update
-is commonly invoked at startup time by
-.Xr rc 8
-when the system goes multi-user.
-.Sh SEE ALSO
-.Xr sync 2 ,
-.Xr fsck 8 ,
-.Xr init 8 ,
-.Xr rc 8 ,
-.Xr sync 8
-.Sh BUGS
-It is possible on some systems, that a
-.Xr sync
-occuring simultaneously with a crash may cause
-file system damage. See
-.Xr fsck 8 .
-.Sh HISTORY
-An
-.Nm update
-command appeared in
-.At v6 .
diff --git a/usr.sbin/update/update.c b/usr.sbin/update/update.c
deleted file mode 100644
index 6c8d7176bb8..00000000000
--- a/usr.sbin/update/update.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * Copyright (c) 1987, 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-char copyright[] =
-"@(#) Copyright (c) 1987, 1990 The Regents of the University of California.\n\
- All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-/*static char sccsid[] = "from: @(#)update.c 5.1 (Berkeley) 6/6/91";*/
-static char rcsid[] = "$Id: update.c,v 1.1 1995/10/18 08:48:30 deraadt Exp $";
-#endif /* not lint */
-
-#include <sys/time.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-
-main()
-{
- struct itimerval value;
- void mysync();
-
- daemon(0, 0);
-
- (void)signal(SIGALRM, mysync);
-
- value.it_interval.tv_sec = 30;
- value.it_interval.tv_usec = 0;
- value.it_value = value.it_interval;
- if (setitimer(ITIMER_REAL, &value, NULL)) {
- perror("update: setitimer");
- exit(1);
- }
- for (;;)
- sigpause(sigblock(0L));
- /* NOTREACHED */
-}
-
-void
-mysync()
-{
- (void)sync();
-}