aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-07-22 10:11:27 +0000
committerEric Andersen <andersen@codepoet.org>2003-07-22 10:11:27 +0000
commita501d0f01fa9e5ec10809c5a150250b0d24cc4d6 (patch)
tree8ed0ef2f3ceccde3391bfc63c947d1511961c65a
parent9c3c38da5575b1eca8690855a2e4894d4cab34e2 (diff)
downloadbusybox-w32-a501d0f01fa9e5ec10809c5a150250b0d24cc4d6.tar.gz
busybox-w32-a501d0f01fa9e5ec10809c5a150250b0d24cc4d6.tar.bz2
busybox-w32-a501d0f01fa9e5ec10809c5a150250b0d24cc4d6.zip
Remove the update utility, that is only relevant to older 2.0.x kernels
that are no longer supported.
-rw-r--r--docs/busybox_header.pod6
-rw-r--r--include/applets.h3
-rw-r--r--include/usage.h9
-rw-r--r--miscutils/Makefile.in1
-rw-r--r--miscutils/update.c107
5 files changed, 3 insertions, 123 deletions
diff --git a/docs/busybox_header.pod b/docs/busybox_header.pod
index f2c700573..944bd48fa 100644
--- a/docs/busybox_header.pod
+++ b/docs/busybox_header.pod
@@ -62,8 +62,8 @@ Currently defined functions include:
62 dpkg-deb, du, dumpkmap, dumpleases, dutmp, echo, egrep, env, expr, 62 dpkg-deb, du, dumpkmap, dumpleases, dutmp, echo, egrep, env, expr,
63 false, fbset, fdflush, fdformat, fgrep, find, fold, free, freeramdisk, 63 false, fbset, fdflush, fdformat, fgrep, find, fold, free, freeramdisk,
64 fsck.minix, ftpget, ftpput, getopt, getty, grep, gunzip, gzip, 64 fsck.minix, ftpget, ftpput, getopt, getty, grep, gunzip, gzip,
65 halt, head, hexdump, hostid, hostname, httpd, hush, hwclock, id, 65 halt, hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock,
66 ifconfig, ifdown, ifup, inetd, init, insmod, ip, ipcalc, iplink, 66 id, ifconfig, ifdown, ifup, inetd, init, insmod, ip, ipcalc, iplink,
67 iproute, iptunnel, kill, killall, klogd, lash, length, linuxrc, 67 iproute, iptunnel, kill, killall, klogd, lash, length, linuxrc,
68 ln, loadacm, loadfont, loadkmap, logger, login, logname, logread, 68 ln, loadacm, loadfont, loadkmap, logger, login, logname, logread,
69 losetup, ls, lsmod, makedevs, md5sum, mesg, minit, mkdir, mkfifo, 69 losetup, ls, lsmod, makedevs, md5sum, mesg, minit, mkdir, mkfifo,
@@ -75,7 +75,7 @@ Currently defined functions include:
75 sha1sum, sleep, sort, start-stop-daemon, strings, stty, su, sulogin, 75 sha1sum, sleep, sort, start-stop-daemon, strings, stty, su, sulogin,
76 swapoff, swapon, sync, syslogd, tail, tar, tee, telnet, telnetd, 76 swapoff, swapon, sync, syslogd, tail, tar, tee, telnet, telnetd,
77 test, tftp, time, top, touch, tr, traceroute, true, tty, udhcpc, 77 test, tftp, time, top, touch, tr, traceroute, true, tty, udhcpc,
78 udhcpd, umount, uname, uncompress, uniq, unix2dos, unzip, update, 78 udhcpd, umount, uname, uncompress, uniq, unix2dos, unzip,
79 uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch, 79 uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch,
80 watchdog, wc, wget, which, who, whoami, xargs, yes, zcat, [ 80 watchdog, wc, wget, which, who, whoami, xargs, yes, zcat, [
81 81
diff --git a/include/applets.h b/include/applets.h
index d01ab2d74..2ee816465 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -613,9 +613,6 @@
613#ifdef CONFIG_UNZIP 613#ifdef CONFIG_UNZIP
614 APPLET(unzip, unzip_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) 614 APPLET(unzip, unzip_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
615#endif 615#endif
616#ifdef CONFIG_UPDATE
617 APPLET(update, update_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
618#endif
619#ifdef CONFIG_UPTIME 616#ifdef CONFIG_UPTIME
620 APPLET(uptime, uptime_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) 617 APPLET(uptime, uptime_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
621#endif 618#endif
diff --git a/include/usage.h b/include/usage.h
index bf1ad949e..5b7db4150 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -2533,15 +2533,6 @@
2533 "\t-x\texclude these files\n" \ 2533 "\t-x\texclude these files\n" \
2534 "\t-d\textract files into this directory" 2534 "\t-d\textract files into this directory"
2535 2535
2536#define update_trivial_usage \
2537 "[options]"
2538#define update_full_usage \
2539 "Periodically flushes filesystem buffers.\n\n" \
2540 "Options:\n" \
2541 "\t-S\tforce use of sync(2) instead of flushing\n" \
2542 "\t-s SECS\tcall sync this often (default 30)\n" \
2543 "\t-f SECS\tflush some buffers this often (default 5)"
2544
2545#define uptime_trivial_usage \ 2536#define uptime_trivial_usage \
2546 "" 2537 ""
2547#define uptime_full_usage \ 2538#define uptime_full_usage \
diff --git a/miscutils/Makefile.in b/miscutils/Makefile.in
index 0ef96f0cd..0f200f4fb 100644
--- a/miscutils/Makefile.in
+++ b/miscutils/Makefile.in
@@ -34,7 +34,6 @@ MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o
34MISCUTILS-$(CONFIG_MT) += mt.o 34MISCUTILS-$(CONFIG_MT) += mt.o
35MISCUTILS-$(CONFIG_STRINGS) += strings.o 35MISCUTILS-$(CONFIG_STRINGS) += strings.o
36MISCUTILS-$(CONFIG_TIME) += time.o 36MISCUTILS-$(CONFIG_TIME) += time.o
37MISCUTILS-$(CONFIG_UPDATE) += update.o
38MISCUTILS-$(CONFIG_WATCHDOG) += watchdog.o 37MISCUTILS-$(CONFIG_WATCHDOG) += watchdog.o
39 38
40libraries-y+=$(MISCUTILS_DIR)$(MISCUTILS_AR) 39libraries-y+=$(MISCUTILS_DIR)$(MISCUTILS_AR)
diff --git a/miscutils/update.c b/miscutils/update.c
deleted file mode 100644
index c51f42183..000000000
--- a/miscutils/update.c
+++ /dev/null
@@ -1,107 +0,0 @@
1/* vi: set sw=4 ts=4: */
2/*
3 * Mini update implementation for busybox; much pasted from update-2.11
4 *
5 *
6 * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>.
7 * Copyright (c) 1996, 1997, 1999 Torsten Poulin.
8 * Copyright (c) 2000 by Karl M. Hegbloom <karlheg@debian.org>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25
26/*
27 * Note: This program is only necessary if you are running a 2.0.x (or
28 * earlier) kernel. 2.2.x and higher flush filesystem buffers automatically.
29 */
30
31#include <sys/param.h>
32#include <sys/syslog.h>
33#include <unistd.h> /* for getopt() */
34#include <stdlib.h>
35#include <sys/kdaemon.h>
36
37#include "busybox.h"
38
39static unsigned int sync_duration = 30;
40static unsigned int flush_duration = 5;
41static int use_sync = 0;
42
43extern int update_main(int argc, char **argv)
44{
45 int pid;
46 int opt;
47
48 while ((opt = getopt(argc, argv, "Ss:f:")) > 0) {
49 switch (opt) {
50 case 'S':
51 use_sync = 1;
52 break;
53 case 's':
54 sync_duration = atoi(optarg);
55 break;
56 case 'f':
57 flush_duration = atoi(optarg);
58 break;
59 default:
60 bb_show_usage();
61 }
62 }
63
64 if (daemon(0, 1) < 0)
65 bb_perror_msg_and_die("daemon");
66
67#ifdef OPEN_MAX
68 for (pid = 0; pid < OPEN_MAX; pid++) close(pid);
69#else
70 /* glibc 2.1.92 requires using sysconf(_SC_OPEN_MAX) */
71 for (pid = 0; pid < sysconf(_SC_OPEN_MAX); pid++) close(pid);
72#endif
73
74 /* This is no longer necessary since 1.3.5x, but it will harmlessly
75 * exit if that is the case.
76 */
77
78 /* set the program name that will show up in a 'ps' listing */
79 argv[0] = "bdflush (update)";
80 argv[1] = NULL;
81 argv[2] = NULL;
82 for (;;) {
83 if (use_sync) {
84 sleep(sync_duration);
85 sync();
86 } else {
87 sleep(flush_duration);
88 if (bdflush(1, 0) < 0) {
89 openlog("update", LOG_CONS, LOG_DAEMON);
90 syslog(LOG_INFO,
91 "This kernel does not need update(8). Exiting.");
92 closelog();
93 return EXIT_SUCCESS;
94 }
95 }
96 }
97
98 return EXIT_SUCCESS;
99}
100
101/*
102Local Variables:
103c-file-style: "linux"
104c-basic-offset: 4
105tab-width: 4
106End:
107*/