Browse Source

[svn-inject] Forking sysvinit source to Trunk

keep-around/7f0c9952b0574901053ab701790fe7050d38ba46
Petter Reinholdtsen 17 years ago
parent
commit
079b060c5e
  1. 0
      COPYRIGHT
  2. 0
      README
  3. 0
      build
  4. 0
      contrib/TODO
  5. 0
      contrib/alexander.viro
  6. 0
      contrib/start-stop-daemon.README
  7. 0
      contrib/start-stop-daemon.c
  8. 0
      contrib/zefram-patches
  9. 19
      current/COPYRIGHT
  10. 7
      current/README
  11. 0
      current/build
  12. 16
      current/contrib/TODO
  13. 29
      current/contrib/alexander.viro
  14. 45
      current/contrib/start-stop-daemon.README
  15. 430
      current/contrib/start-stop-daemon.c
  16. 120
      current/contrib/zefram-patches
  17. 547
      current/doc/Changelog
  18. 56
      current/doc/Install
  19. 81
      current/doc/Propaganda
  20. 19
      current/doc/bootlogd.README
  21. 14
      current/doc/sysvinit-2.85.lsm
  22. 14
      current/doc/sysvinit-2.86.lsm
  23. 39
      current/man/bootlogd.8
  24. 35
      current/man/bootlogd.8.todo
  25. 102
      current/man/halt.8
  26. 284
      current/man/init.8
  27. 55
      current/man/initscript.5
  28. 248
      current/man/inittab.5
  29. 17
      current/man/killall5.8
  30. 101
      current/man/last.1
  31. 1
      current/man/lastb.1
  32. 42
      current/man/mesg.1
  33. 37
      current/man/mountpoint.1
  34. 48
      current/man/pidof.8
  35. 1
      current/man/poweroff.8
  36. 1
      current/man/reboot.8
  37. 39
      current/man/runlevel.8
  38. 196
      current/man/shutdown.8
  39. 63
      current/man/sulogin.8
  40. 1
      current/man/telinit.8
  41. 58
      current/man/wall.1
  42. 58
      current/obsolete/README.RIGHT.NOW
  43. 67
      current/obsolete/bootlogd.init
  44. 56
      current/obsolete/powerd.8
  45. 36
      current/obsolete/powerd.README
  46. 192
      current/obsolete/powerd.c
  47. 58
      current/obsolete/powerd.cfg
  48. 61
      current/obsolete/utmpdump.c.OLD
  49. 148
      current/src/Makefile
  50. 626
      current/src/bootlogd.c
  51. 216
      current/src/dowall.c
  52. 301
      current/src/halt.c
  53. 123
      current/src/hddown.c
  54. 75
      current/src/ifdown.c
  55. 2673
      current/src/init.c
  56. 123
      current/src/init.h
  57. 77
      current/src/initreq.h
  58. 25
      current/src/initscript.sample
  59. 622
      current/src/killall5.c
  60. 874
      current/src/last.c
  61. 115
      current/src/mesg.c
  62. 119
      current/src/mountpoint.c
  63. 25
      current/src/oldutmp.h
  64. 40
      current/src/paths.h
  65. 36
      current/src/reboot.h
  66. 44
      current/src/runlevel.c
  67. 10
      current/src/set.h
  68. 712
      current/src/shutdown.c
  69. 456
      current/src/sulogin.c
  70. 202
      current/src/utmp.c
  71. 287
      current/src/utmpdump.c
  72. 114
      current/src/wall.c
  73. 0
      doc/Changelog
  74. 0
      doc/Install
  75. 0
      doc/Propaganda
  76. 0
      doc/bootlogd.README
  77. 0
      doc/sysvinit-2.85.lsm
  78. 0
      doc/sysvinit-2.86.lsm
  79. 0
      man/bootlogd.8
  80. 0
      man/bootlogd.8.todo
  81. 0
      man/halt.8
  82. 0
      man/init.8
  83. 0
      man/initscript.5
  84. 0
      man/inittab.5
  85. 0
      man/killall5.8
  86. 0
      man/last.1
  87. 0
      man/lastb.1
  88. 0
      man/mesg.1
  89. 0
      man/mountpoint.1
  90. 0
      man/pidof.8
  91. 0
      man/poweroff.8
  92. 0
      man/reboot.8
  93. 0
      man/runlevel.8
  94. 0
      man/shutdown.8
  95. 0
      man/sulogin.8
  96. 0
      man/telinit.8
  97. 0
      man/wall.1
  98. 0
      obsolete/README.RIGHT.NOW
  99. 0
      obsolete/bootlogd.init
  100. 0
      obsolete/powerd.8

0
2.86.ds1/COPYRIGHT → COPYRIGHT

0
2.86.ds1/README → README

0
2.86.ds1/build → build

0
2.86.ds1/contrib/TODO → contrib/TODO

0
2.86.ds1/contrib/alexander.viro → contrib/alexander.viro

0
2.86.ds1/contrib/start-stop-daemon.README → contrib/start-stop-daemon.README

0
2.86.ds1/contrib/start-stop-daemon.c → contrib/start-stop-daemon.c

0
2.86.ds1/contrib/zefram-patches → contrib/zefram-patches

19
current/COPYRIGHT

@ -1,19 +0,0 @@
Sysvinit is Copyright (C) 1991-2004 Miquel van Smoorenburg
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
On Debian GNU/Linux systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.

7
current/README

@ -1,7 +0,0 @@
contrib Unofficial stuff
doc Documentation, mostly obsolete
man Manual pages, not obsolete
obsolete Really obsolete stuff ;)
src Source code

0
current/build

16
current/contrib/TODO

@ -1,16 +0,0 @@
There are several things on the wishlist. See also the "wishlist" bugs filed
against sysvinit in the debian bugs system (http://www.debian.org/Bugs/).
1. A special target for kbrequest, so that extra CHILDs are
created (each one needs its own utmp/wtmp bookkeeping)
2. Extend the initreq.h interface?
3. Add GNU last long options to last
4. Write all boot messages to a logfile
Problem: TIOCCONS ioctl redirects console output, it doesn't copy it.
I think this is not easily possible without kernel support.
I do not like the idea of booting with a pseudo tty as console and
a redirect process behind it writing to both the real console and a
logfile - too fragile.

29
current/contrib/alexander.viro

@ -1,29 +0,0 @@
I proposed moving some stuff to a seperate file, such as the
re-exec routines. Alexander wrote:
According to Alexander Viro <viro@math.psu.edu>:
> As for the code separation - I think it's nice. Actually, read_inittab()
> with get_part() and newFamily are also pretty separatable. Another good
> set is any(), spawn(), startup(), spawn_emerg() and start_if_needed().
> BTW, fail_check();process_signals(); is equivalent to process_signal();
> fail_check();. I think that swapping them (in main loop) would be a good
> idea - then we can move fail_check() into start_if_needed(). And one more
> - I'ld propose to move start_if_needed to the beginning of the main loop,
> as in
> foo();
> while(1) { bar();foo();
> #if 0
> baz();
> #endif
> }
> to
> while(1) { foo();bar();
> #if 0
> baz();
> #endif
> }
>
>
> What do you think about it?

45
current/contrib/start-stop-daemon.README

@ -1,45 +0,0 @@
Start-stop-daemon is the program that is used by the DEBIAN style init
scripts to start and stop services. This program is part of the "dpkg"
package by Ian Jackson. However there is also a seperate C version (the
original is in perl) available written by Marek Michalkiewicz. I'm including
it for your convinience.
Note that the latest debian dpkg packages (4.0.18 and later) contain
a much improved update-rc.d. This code is almost a year old.
The original announcement follows:
From: Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>
Message-Id: <199606060324.FAA19493@i17linuxb.ists.pwr.wroc.pl>
Subject: Fast start-stop-daemon in C
To: debian-devel@lists.debian.org
Date: Thu, 6 Jun 1996 05:24:18 +0200 (MET DST)
Some time ago I wrote a faster C replacement for the start-stop-daemon
perl script. I use it for some time now (the most recent changes were
just a nicer help screen; the code is quite stable).
This makes the system boot faster (especially on low end machines),
and important system startup scripts no longer depend on another big
package (perl). Maybe in the future we can get to the point where
a minimal system will work without perl installed at all (packages
which need it in {pre,post}{inst,rm} scripts would depend on perl).
The only problem known so far to me is that I have to reinstall this
program after every dpkg upgrade which overwrites it with that nice
slooow perl script :-).
Just compile this program and drop the binary in /usr/sbin instead
of the original /usr/sbin/start-stop-daemon perl script (make a copy
of it first, just in case). See below for source code. I placed it
in the public domain, but if it has to be GPL-ed to be included in
dpkg, just tell me. Including it in dpkg would close Bug#1670.
I am posting it here so that it can be tested by more people than
just me. Bugs are unlikely though.
Have fun,
Marek

430
current/contrib/start-stop-daemon.c

@ -1,430 +0,0 @@
/*
* A rewrite of the original Debian's start-stop-daemon Perl script
* in C (faster - it is executed many times during system startup).
*
* Written by Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>,
* public domain.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <signal.h>
#include <errno.h>
#include <sys/stat.h>
#include <dirent.h>
#include <unistd.h>
#include <getopt.h>
#include <pwd.h>
#define VERSION "version 0.3, 1996-06-05"
static int testmode = 0;
static int quietmode = 0;
static int exitnodo = 1;
static int start = 0;
static int stop = 0;
static int signal_nr = 15;
static int user_id = -1;
static const char *userspec = NULL;
static const char *cmdname = NULL;
static char *execname = NULL;
static char *startas = NULL;
static const char *pidfile = NULL;
static const char *progname = "";
static struct stat exec_stat;
struct pid_list {
struct pid_list *next;
int pid;
};
static struct pid_list *found = NULL;
static struct pid_list *killed = NULL;
static void *xmalloc(int size);
static void push(struct pid_list **list, int pid);
static void do_help(void);
static void parse_options(int argc, char * const *argv);
static int pid_is_exec(int pid, const struct stat *esb);
static int pid_is_user(int pid, int uid);
static int pid_is_cmd(int pid, const char *name);
static void check(int pid);
static void do_pidfile(const char *name);
static void do_procfs(void);
static void do_stop(void);
#ifdef __GNUC__
static void fatal(const char *format, ...)
__attribute__((noreturn, format(printf, 1, 2)));
static void badusage(const char *msg)
__attribute__((noreturn));
#else
static void fatal(const char *format, ...);
static void badusage(const char *msg);
#endif
static void
fatal(const char *format, ...)
{
va_list arglist;
fprintf(stderr, "%s: ", progname);
va_start(arglist, format);
vfprintf(stderr, format, arglist);
va_end(arglist);
putc('\n', stderr);
exit(2);
}
static void *
xmalloc(int size)
{
void *ptr;
ptr = malloc(size);
if (ptr)
return ptr;
fatal("malloc(%d) failed", size);
}
static void
push(struct pid_list **list, int pid)
{
struct pid_list *p;
p = xmalloc(sizeof(*p));
p->next = *list;
p->pid = pid;
*list = p;
}
static void
do_help(void)
{
printf("\
start-stop-daemon for Debian Linux - small and fast C version written by\n\
Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>, public domain.\n"
VERSION "\n\
\n\
Usage:
start-stop-daemon -S|--start options ... -- arguments ...\n\
start-stop-daemon -K|--stop options ...\n\
start-stop-daemon -H|--help\n\
start-stop-daemon -V|--version\n\
\n\
Options (at least one of --exec|--pidfile|--user is required):
-x|--exec <executable> program to start/check if it is running\n\
-p|--pidfile <pid-file> pid file to check\n\
-u|--user <username>|<uid> stop this user's processes\n\
-n|--name <process-name> stop processes with this name\n\
-s|--signal <signal> signal to send (default 15)\n\
-a|--startas <pathname> program to start (default <executable>)\n\
-t|--test test mode, don't do anything\n\
-o|--oknodo exit status 0 (not 1) if nothing done\n\
-q|--quiet | -v, --verbose\n\
\n\
Exit status: 0 = done 1 = nothing done (=> 0 if --oknodo) 2 = trouble\n");
}
static void
badusage(const char *msg)
{
if (msg && *msg)
fprintf(stderr, "%s: %s\n", progname, msg);
fprintf(stderr, "Try `%s --help' for more information.\n", progname);
exit(2);
}
static void
parse_options(int argc, char * const *argv)
{
static struct option longopts[] = {
{ "help", 0, NULL, 'H'},
{ "stop", 0, NULL, 'K'},
{ "start", 0, NULL, 'S'},
{ "version", 0, NULL, 'V'},
{ "startas", 1, NULL, 'a'},
{ "name", 1, NULL, 'n'},
{ "oknodo", 0, NULL, 'o'},
{ "pidfile", 1, NULL, 'p'},
{ "quiet", 0, NULL, 'q'},
{ "signal", 1, NULL, 's'},
{ "test", 0, NULL, 't'},
{ "user", 1, NULL, 'u'},
{ "verbose", 0, NULL, 'v'},
{ "exec", 1, NULL, 'x'},
{ NULL, 0, NULL, 0}
};
int c;
for (;;) {
c = getopt_long(argc, argv, "HKSVa:n:op:qs:tu:vx:",
longopts, (int *) 0);
if (c == -1)
break;
switch (c) {
case 'H': /* --help */
do_help();
exit(0);
case 'K': /* --stop */
stop = 1;
break;
case 'S': /* --start */
start = 1;
break;
case 'V': /* --version */
printf("start-stop-daemon " VERSION "\n");
exit(0);
case 'a': /* --startas <pathname> */
startas = optarg;
break;
case 'n': /* --name <process-name> */
cmdname = optarg;
break;
case 'o': /* --oknodo */
exitnodo = 0;
break;
case 'p': /* --pidfile <pid-file> */
pidfile = optarg;
break;
case 'q': /* --quiet */
quietmode = 1;
break;
case 's': /* --signal <signal> */
if (sscanf(optarg, "%d", &signal_nr) != 1)
badusage("--signal takes a numeric argument");
break;
case 't': /* --test */
testmode = 1;
break;
case 'u': /* --user <username>|<uid> */
userspec = optarg;
break;
case 'v': /* --verbose */
quietmode = -1;
break;
case 'x': /* --exec <executable> */
execname = optarg;
break;
default:
badusage(""); /* message printed by getopt */
}
}
if (start == stop)
badusage("need one of --start or --stop");
if (!execname && !pidfile && !userspec)
badusage("need at least one of --exec, --pidfile or --user");
if (!startas)
startas = execname;
if (start && !startas)
badusage("--start needs --exec or --startas");
}
static int
pid_is_exec(int pid, const struct stat *esb)
{
struct stat sb;
char buf[32];
sprintf(buf, "/proc/%d/exe", pid);
if (stat(buf, &sb) != 0)
return 0;
return (sb.st_dev == esb->st_dev && sb.st_ino == esb->st_ino);
}
static int
pid_is_user(int pid, int uid)
{
struct stat sb;
char buf[32];
sprintf(buf, "/proc/%d", pid);
if (stat(buf, &sb) != 0)
return 0;
return (sb.st_uid == uid);
}
static int
pid_is_cmd(int pid, const char *name)
{
char buf[32];
FILE *f;
int c;
sprintf(buf, "/proc/%d/stat", pid);
f = fopen(buf, "r");
if (!f)
return 0;
while ((c = getc(f)) != EOF && c != '(')
;
if (c != '(') {
fclose(f);
return 0;
}
/* this hopefully handles command names containing ')' */
while ((c = getc(f)) != EOF && c == *name)
name++;
fclose(f);
return (c == ')' && *name == '\0');
}
static void
check(int pid)
{
if (execname && !pid_is_exec(pid, &exec_stat))
return;
if (userspec && !pid_is_user(pid, user_id))
return;
if (cmdname && !pid_is_cmd(pid, cmdname))
return;
push(&found, pid);
}
static void
do_pidfile(const char *name)
{
FILE *f;
int pid;
f = fopen(name, "r");
if (f) {
if (fscanf(f, "%d", &pid) == 1)
check(pid);
fclose(f);
}
}
static void
do_procfs(void)
{
DIR *procdir;
struct dirent *entry;
int foundany, pid;
procdir = opendir("/proc");
if (!procdir)
fatal("opendir /proc: %s", strerror(errno));
foundany = 0;
while ((entry = readdir(procdir)) != NULL) {
if (sscanf(entry->d_name, "%d", &pid) != 1)
continue;
foundany++;
check(pid);
}
closedir(procdir);
if (!foundany)
fatal("nothing in /proc - not mounted?");
}
static void
do_stop(void)
{
char what[1024];
struct pid_list *p;
if (cmdname)
strcpy(what, cmdname);
else if (execname)
strcpy(what, execname);
else if (pidfile)
sprintf(what, "process in pidfile `%s'", pidfile);
else if (userspec)
sprintf(what, "process(es) owned by `%s'", userspec);
else
fatal("internal error, please report");
if (!found) {
if (quietmode <= 0)
printf("no %s found; none killed.\n", what);
exit(exitnodo);
}
for (p = found; p; p = p->next) {
if (testmode)
printf("would send signal %d to %d.\n",
signal_nr, p->pid);
else if (kill(p->pid, signal_nr) == 0)
push(&killed, p->pid);
else
printf("%s: warning: failed to kill %d: %s\n",
progname, p->pid, strerror(errno));
}
if (quietmode < 0 && killed) {
printf("stopped %s (pid", what);
for (p = killed; p; p = p->next)
printf(" %d", p->pid);
printf(").\n");
}
}
int
main(int argc, char **argv)
{
progname = argv[0];
parse_options(argc, argv);
argc -= optind;
argv += optind;
if (execname && stat(execname, &exec_stat))
fatal("stat %s: %s", execname, strerror(errno));
if (userspec && sscanf(userspec, "%d", &user_id) != 1) {
struct passwd *pw;
pw = getpwnam(userspec);
if (!pw)
fatal("user `%s' not found\n", userspec);
user_id = pw->pw_uid;
}
if (pidfile)
do_pidfile(pidfile);
else
do_procfs();
if (stop) {
do_stop();
exit(0);
}
if (found) {
if (quietmode <= 0)
printf("%s already running.\n", execname);
exit(exitnodo);
}
if (testmode) {
printf("would start %s ", startas);
while (argc-- > 0)
printf("%s ", *argv++);
printf(".\n");
exit(0);
}
if (quietmode < 0)
printf("starting %s ...\n", startas);
*--argv = startas;
execv(startas, argv);
fatal("unable to start %s: %s", startas, strerror(errno));
}

120
current/contrib/zefram-patches

@ -1,120 +0,0 @@
Date: Mon, 14 Apr 1997 15:39:08 +0100 (BST)
From: Zefram <zefram@dcs.warwick.ac.uk>
Message-Id: <25042.199704141439@stone.dcs.warwick.ac.uk>
Subject: SysVinit patch
To: miquels@drinkel.cistron.nl
Hi. Enclosed is a patch for SysVinit that I am finding tiresome to
keep updating; you might like to fold it into your official releases.
It does the following:
* shutdown: use /etc/shutdown.allow if an option -s is given instead
of testing for a controlling tty. The tty check was inflexible and
unreliable.
* sulogin(8): refer to inittab(5) instead of inittab(4).
* sulogin: use libc passwd/shadow functions instead of home-grown ones
(there's just no point in using the special version).
* shutdown/sulogin: don't rely on the username "root" -- it's the UID
that counts.
-zefram
begin 644 initdiffs.gz
M'XL(``IG43,"`^T[:U/;R+*?E5_1>&L3&\G&#Y[FD%H")/%9)U"8G-0](44)
M>62KD"6M1K+7)YO_?KM[1K)DFP"[V:T]=2^5`FFFIZ??W=.C##W7A;H3@YS+
MJ1=X2;W=V#W8DN,T&8:SH+%?GC`+,\\V-S?O76:\CCWX9QI`:QO_=3N[W68;
M6@<'N\_J]?K].(T!+CF.8FAUH-WI-G>Z.QU:MD>;%7]X\U;+:NT!OP(T7L&6
MO/6"'!N-7;Z"3W!=3^BY=PE2./#YV48^'M^-`\?%(9J&Q)L(7M3#R9D=!UXP
MJD^$E/9(*)CKRM>O7YD#M34^U?_0UO*I>Z\3P^Z!M;>MQ$"DX>M^*R--_!KY
M-DHZC.>0H0L#2,8"G'`RL8,A^%X@<,!.8.;Y/MP*I#5((`G!]GU$D4H1R\:"
M!),>OGSY`E"7]-*[@&OWU75=7KL7^'X6R#36"&U>#'::C,/8DV)(6$E(0%)B
M*M`4$C$!3X(?CD8(X04-Q'(UQA'\%X3Q!,F8$Z(AS,8BH,TR.>..!.0@!,[>
MSFF.[`K'J_LU"_'PBI,D]NO'?E(_%3[!1S%*0@P;``,A%!7"2;R0</>.'0=G
MX20,DCCT%4^WP@]GX(8Q3$+DS0M<(HM6-)0X2"Z0RR53)DNF1V^$!N`C$:,E
MP/:^WJJ;.U9K8=?(TLG59;]^W+^JGY[UB64;:=`\6,2U$PLD)AB!'8`=17$8
MQ9Z="$`UHMJ]@+'TMD3B;)%T$OL6L324C"?"#J32EIB*>!ZB,<S&(8QME--X
M+CT4+M@L$T2#Q"O3"63H"[@3\]O0CH>H@4#IM:!2YA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Z7&[PEX8V3HN`
M,G9V'YDOJ9)4J&^COU*LG_(2Q2F:G1TG:53K@E[FNGXJQZ1!E(J^R:.OK-I[
M5FL_OZI<DOZ?7`BAKK(XL(1D:5A&-"C7Q<DGE3IJP_75SF)NN>!9S-Q;\RQ`
MRF7/8GRI\EE,%(N?PDYKZI^(B2+CG.&B:O,1D?G$I@\5N-EHPX?>*30S$;,2
ME5$5XW*FDE*)!`]GVSRU%D)8'E'J+]=DO;\BZ97W5G</S47"D[E$980&D9-*
MQE$0[GK17A0=]4=9"H`E1+R?\"4?8[(X*QE$1C?X%Q/<NBU4`JL,RFP^?CN5
M\4H2H"YW<>/#0@#^6\9?]<Y\_961^$?YK3AL@1;T=XW&:_L;!WM6IYEW^PP5
M<`V4CX/"&6/$LV!W6Z'$>D8$TVKE[?F[,R113;:4.61S_?,WU):N9!?&*P!T
M`;`T6T`]>'O6[^.P3'51K^:U"ZL.S+;5WLG_Y\%W)+AHX_>1O0KS:.+7-F3V
M]ZW.P4XN_3Q,K76*0MA1]6RK6*UR<5NH*PJA.[^_5)!K8A8&+?CM-X;(OL[!
MPI=C<35:L*TC[,J`^BI`W;1J[FF7FN[3=':LSO9"94_D<HFQ<@C5+?B_G*__
)!9>7)7O2-```
`
end

547
current/doc/Changelog

@ -1,547 +0,0 @@
sysvinit (2.86) cistron; urgency=low
* Fixed up bootlogd to read /proc/cmdline. Also keep an internal
linebuffer to process \r, \t and ^H. It is becoming useable.
* Applied trivial OWL patches
* Block signals in syslog(), since syslog() is not re-entrant
(James Olin Oden <joden@malachi.lee.k12.nc.us>, redhat bug #97534)
* Minor adjustements so that sysvinit compiles on the Hurd
* killall5 now skips kernel threads
* Inittab entries with both 'S' and other runlevels were broken.
Fix by Bryan Kadzban <bryan@kadzban.is-a-geek.net>
* Changed initreq.h to be more flexible and forwards-compatible.
* You can now through /dev/initctl set environment variables in
init that will be inherited by its children. For now, only
variables prefixed with INIT_ can be set and the maximum is
16 variables. There's also a length limit due to the size
of struct init_request, so it should be safe from abuse.
* Option -P and -H to shutdown set INIT_HALT=POWERDOWN and
INIT_HALT=HALT as environment variables as described above
* Add "mountpoint" utility.
* Slightly better algorithm in killall5.c:pidof()
* Added some patches from fedora-core (halt-usage, last -t,
sulogin-message, user-console)
-- Miquel van Smoorenburg <miquels@cistron.nl> Fri, 30 Jul 2004 14:14:58 +0200
sysvinit (2.85) cistron; urgency=low
* Add IPv6 support in last(1)
* Sulogin: even if the root password is empty, ask for a password-
otherwise there is no way to set a timeout.
* Removed support for ioctl.save.
* Turned of support for /etc/initrunlvl and /var/run/initrunlvl
* Fixed warts in dowall.c ("Dmitry V. Levin" <ldv@altlinux.org>)
* Fix init.c::spawn(). The "f" variable was used both as file descriptor
and waitpid(2) return code. In certain circumstances, this leads to
TIOCSCTTY with wrong file descriptor (Vladimir N. Oleynik).
* Fix fd leak in sulogin (Dmitry V. Levin).
* More error checking in all wait() calling code (Dmitry V. Levin).
* Fix argv[] initialization in spawn() (Dmitry V. Levin).
* Change strncpy to strncat in most places (Dmitry V. Levin).
-- Miquel van Smoorenburg <miquels@cistron.nl> Tue, 15 Apr 2003 16:37:57 +0200
sysvinit (2.84) cistron; urgency=low
* Don't use /etc/initlvl interface for telinit; only use /dev/initctl,
and give a clear error when that fails.
* Add -i/--init command line flag to init - this tells init
'behave as system init even if you're not PID#1'. Useful for
testing in chroot/jail type environments.
-- Miquel van Smoorenburg <miquels@cistron.nl> Tue, 27 Nov 2001 13:10:08 +0100
sysvinit (2.83) cistron; urgency=low
* Fix bug in shutdown where it didn't check correctly for a
virtual console when checking /etc/shutdown.allow
* Fix race condition in waitpid() [Andrea Arcangeli]
* Call closelog() after openlog()/syslog() since recent libc's
keep the logging fd open and that is fd#0 aka stdin.
-- Miquel van Smoorenburg <miquels@cistron.nl> Tue, 2 Oct 2001 23:27:06 +0200
sysvinit (2.82) cistron; urgency=low
* Print out correct version number at startup.
* Fix spelling of initttab in init(8)
-- Miquel van Smoorenburg <miquels@cistron.nl> Thu, 23 Aug 2001 17:50:44 +0200
sysvinit (2.81) cistron; urgency=low
* Fix typo/bug in killall5/pidof, -o option failed to work since 2.79.
Reformatted source code to prevent this from happening again.
* shutdown.8: applied redhat manpage update
* sulogin: applied redhat sysvinit-2.78-sulogin-nologin.patch
* sulogin: applied redhat sysvinit-2.78-notty.patch
* sulogin: applied redhat sysvinit-2.78-sigint.patch
sysvinit (2.80) cistron; urgency=low
* Grammar/spelling fixes in shutdown.c (Christian Steinrueck)
* Don't set controlling tty for non-(sysinit,boot,single) runlevels
-- Miquel van Smoorenburg <miquels@cistron.nl> Thu, 26 Jul 2001 13:26:56 +0200
sysvinit (2.79) cistron; urgency=low
* New upstream version
* several fixes to wall by Tim Robbins <fyre@box3n.gumbynet.org>
* Several extra boundary checks by Solar Designer
* Make /dev/console controlling tty
* Stricter checks on ownership of tty by mesg(1)
* Documented and restricted -n option to wall(1)
* Make it compile with glibc 2.2.2
* Document IO redirection in wall manpage (closes: #79491)
* Update README (closes: #85650)
* Fix init.8 manpage (closes: #75268)
* Fix typo in halt(8) manpage (closes: #67875)
* Check time argument of shutdown(8) for correctness (closes: #67825)
* Check for stale sessions in last(1) (Chris Wolf <cwolf@starclass.com>)
-- Miquel van Smoorenburg <miquels@cistron.nl> Wed, 4 Jul 2001 15:04:36 +0200
sysvinit (2.78-2) frozen unstable; urgency=high
* Change "booting" to "reloading" message at reload
* Add "-z xxx" dummy command line argument (closes: #54717)
-- Miquel van Smoorenburg <miquels@cistron.nl> Fri, 11 Feb 2000 12:17:54 +0100
sysvinit (2.78-1) unstable; urgency=low
* 2.78 will be the new upstream version, I'm skipping 2.77
* Shutdown now calls sync before switching the runlevel to 0 or 6,
or before unmounting filesystems if -n was used (closes: #46461)
* Some cosmetic changes to init.c (closes: #32079)
-- Miquel van Smoorenburg <miquels@cistron.nl> Thu, 30 Dec 1999 20:40:23 +0100
sysvinit (2.77-2) unstable; urgency=low
* Fix last -i option
-- Miquel van Smoorenburg <miquels@cistron.nl> Tue, 5 Oct 1999 21:51:50 +0200
sysvinit (2.77-1) unstable; urgency=low
* Write reboot record into utmp file as well to make rms happy
* Fork and dump core in / if SIGSEGV is received for debugging purposes
* Patch by Craig Sanders <cas@vicnet.net.au> for "last" -i option
-- Miquel van Smoorenburg <miquels@cistron.nl> Wed, 4 Aug 1999 11:16:23 +0200
sysvinit (2.76-4) unstable; urgency=low
* Change dowall.c to handle Unix98 ptys correctly
* Add comment in rcS about usage of setup.sh and unconfigured.sh
* Shutdown now removes nologin file just before calling telinit
* SEGV handler now tries to continue after sleep of 30 seconds.
On a 386-class processor it also prints out the value of EIP.
* Fix for racecondition in check_init_fifo() by Richard Gooch
-- Miquel van Smoorenburg <miquels@cistron.nl> Sat, 8 May 1999 17:22:57 +0200
sysvinit (2.76-3) frozen unstable; urgency=high
* Small bugfix to last.c courtesy of Danek Duvall <duvall@emufarm.ml.org>
-- Miquel van Smoorenburg <miquels@cistron.nl> Tue, 12 Jan 1999 12:12:44 +0100
sysvinit (2.76-1) frozen unstable; urgency=high
* Fix bug in check_pipe() which crashes init on the Alpha.
-- Miquel van Smoorenburg <miquels@cistron.nl> Tue, 3 Nov 1998 11:09:13 +0100
sysvinit (2.75-4) unstable; urgency=low
* Change sulogin password buffer to 128 characters.
* Don't print control characters in dowall.c
* Try to open getenv ("CONSOLE"), /dev/console and /dev/tty0 in order.
For backwards compatibility when you try to boot a 2.0.x kernel
with a linux > 2.1.70 /dev/console device.
* Change src/Makefile for non-debian systems (mainly, RedHat)
* Try to create /dev/initctl if not present; check every time to see
if the dev/ino of /dev/initctl has changed and re-open it. This should
help devfs a bit.
* Send SIGUSR1 to init at bootup to let it re-open /dev/initctl;
again in support of devfs.
* Moved pidof to /bin (it's only a link to killall5 anyway)
-- Miquel van Smoorenburg <miquels@cistron.nl> Mon, 5 Oct 1998 14:03:14 +0200
sysvinit (2.75-2) frozen unstable; urgency=medium
* Fix last.c again.
* Add check to see if /dev/initctl is really a FIFO
* In ifdown.c first down all shaper devices then the real devices
-- Miquel van Smoorenburg <miquels@cistron.nl> Tue, 2 Jun 1998 22:43:01 +0200
sysvinit (2.75-1) frozen unstable; urgency=low
* Rewrote last.c to be much more memory friendly and correct,
thanks to Nick Andrew <nick@zeta.org.au> and
David Parrish <dparrish@zeta.org.au>
* Fixes bugs:
#21616: sysvinit: sulogin thinks md5 root password is bad
#21765: sysvinit: Typo in `killall5.c'
#21775: sysvinit: sysvinit does not support MD5 hashed passwords
#21990: /usr/bin/last: unnecessary memset and off-by-one bug
#22084: sysvinit 2.74-4: SIGPWR missing on sparc
#21900: init, powerfail events, and shutdown.allow
#21702: init 0 does not work as expected...
#21728: sysvinit: Typo in `init.c'
#22363: sysvinit: discrepance btw. manpage and /sbin/init
-- Miquel van Smoorenburg <miquels@cistron.nl> Tue, 19 May 1998 11:02:29 +0200
sysvinit (2.74-4) frozen unstable; urgency=medium
* Add -o option to last to process libc5 utmp files.
* Buffer overflow fixed in init.c (not very serious; only exploitable
by root). Thanks to Chris Evans <chris@ferret.lmh.ox.ac.uk>
-- Miquel van Smoorenburg <miquels@cistron.nl> Wed, 15 Apr 1998 17:04:33 +0200
sysvinit (2.74-1) unstable; urgency=low
* Should compile with glibc 1.99 :)
* Change behaviour of reboot(1) and halt(1) so that the default when
the runlevel can't be determined is to call shutdown.
* Added re-exec patch from Al Viro (21 Feb 1998):
'U' flag added to telinit. It forces init to re-exec itself
(passing its state through exec, certainly).
May be useful for smoother (heh) upgrades.
24 Feb 1998, AV:
did_boot made global and added to state - thanks, Miquel.
Yet another file descriptors leak - close state pipe if
re_exec fails.
-- Miquel van Smoorenburg <miquels@cistron.nl> Thu, 12 Mar 1998 17:42:46 +0100
sysvinit (2.73-2) unstable; urgency=low
* Change _NSIG to NSIG for 2.1.x kernel includes.
-- Miquel van Smoorenburg <miquels@cistron.nl> Thu, 8 Jan 1998 16:01:02 +0100
sysvinit (2.73-1) unstable; urgency=low
* Use siginterrupt, now that system calls are restarted by default.
Main symptom was that the sulogin timeout didn't work but there
might have been more hidden problems.
* Kill process immidiately if turned off in inittab
* Fixed sulogin check on tty arg.
* Use strerror() instead of sys_errlist
* wall now supports a '-n' option to suppress [most of] the banner.
Debian doesn't use sysvinit's wall, but apparently Redhat does.
* Add '-F' (forcefsck) option to shutdown
* Close and reopen /dev/initctl on SIGUSR1 (mainly for a /dev in ram)
-- Miquel van Smoorenburg <miquels@cistron.nl> Sat, 3 Jan 1998 16:32:39 +0100
sysvinit (2.72-3) unstable; urgency=low
* Add extra fork() in dowall.c to avoid hanging in rare cases
-- Miquel van Smoorenburg <miquels@cistron.nl> Wed, 22 Oct 1997 14:44:00 +0200
sysvinit (2.72) unstable; urgency=low
* Applied manual page patches by Bill Hawes <whawes@star.net>. Thanks Bill!
* Applied patches to the sample Slackware scripts by
"Jonathan I. Kamens" <jik@kamens.brookline.ma.us>
* Fix halt and reboot runlevels 0 & 6 check.
* Only say "no more processes left in runlevel x" once
* Fix race condition with SIGCHLD in spawn()
(thanks to Alon Ziv <alonz@CS.Technion.AC.IL>)
* Compress all manpages (missed 2)
* Compiled for libc6
* Added poweroff patch by Roderich Schupp <rsch@ExperTeam.de>
-- Miquel van Smoorenburg <miquels@cistron.nl> Sun, 12 Oct 1997 17:20:17 +0200
sysvinit (2.71-2) frozen unstable; urgency=low
* Print 2.71 instead of 2.70 on startup :)
-- Miquel van Smoorenburg <miquels@cistron.nl> Mon, 5 May 1997 12:45:25 +0200
sysvinit (2.71-1) frozen unstable; urgency=high
* Added code for updwtmp() in utmp.c for glibc (2.0.3)
* Fixed all programs to use functions from utmp.c and getutent()
* Do not try to clean up utmp in init itself (Bug#9022)
* Removed sync() from main loop.
* Hopefully fixes bug #8657 (shutdown signal handling)
-- Miquel van Smoorenburg <miquels@cistron.nl> Sat, 26 Apr 1997 19:57:27 +0200
sysvinit (2.70-1) unstable; urgency=low
* Respawn fix
* Removed StUdLy CaPs from source code
* Moved files in source archive around
* Fixes for glibc (utmp handling, signal handling).
* Fixed '-d' option to last (now also works without '-a').
* Added extra checking in last.c to prevent showing dead entries
-- Miquel van Smoorenburg <miquels@cistron.nl> Fri, 7 Feb 1997 15:31:30 +0100
sysvinit (2.69-1) frozen unstable; urgency=medium
* Fixed bug that can throw X in a loop (or any other app that reads from
/dev/tty0)
-- Miquel van Smoorenburg <miquels@cistron.nl> Sun, 1 Dec 1996 15:32:24 +0100
sysvinit (2.67-1) frozen unstable; urgency=high
* Fixes problem with /dev/console being controlling terminal of some
daemons
* Puts copyright file in the right place
-- Miquel van Smoorenburg <miquels@cistron.nl> Fri, 15 Nov 1996 12:23:33 +0100
sysvinit (2.66-1) unstable; urgency=medium
* Skipped 2.65. A development 2.65 got out by accident and is apparently
being used..
* Also compiles and runs with GNU libc (and on the Alpha)
* Fixed dowall.c not to exit when getpwuid() fails and uid == 0.
* Fixed init panic'ing on empty lines in /etc/inittab
* Changed default PATH to include /usr/local/sbin
* Set /dev/console as controlling terminal for sysinit,bootwait,wait,powerwait
This allows using ^C to interrupt some parts of eg the boot process.
* Remove old symlink in /var/log/initlvl; let init check both
/var/log and /etc itself.
-- Miquel van Smoorenburg <miquels@cistron.nl> Tue, 29 Oct 1996 13:46:54 +0100
2.66 29-Oct-1996
- Skipped 2.65. A development 2.65 got out by accident and is apparently
being used..
- Fixed dowall.c not to exit when getpwuid() fails and uid == 0.
- Fixed init panic'ing on empty lines in /etc/inittab
- Changed default PATH to include /usr/local/sbin
- Ported to Linux/Alpha and GNU libc.
- Set /dev/console as controlling terminal for sysinit,bootwait,wait,powerwait.
This allows using ^C to interrupt some parts of eg the boot process.
- Remove old symlink in /var/log/initlvl; let init check both
/var/log and /etc itself.
2.64 28-Jun-1996
- Init checks CONSOLE environment variable on startup (overrides /dev/console)
- Init sets CONSOLE variable for all its children.
- Wtmp(): when zeroing out old utmp entries, keep ut_id field
- Wtmp(): try to re-use ut_id field if possible.
- SetTerm(): only read from /etc/ioctl.save if written once.
- Included start-stop-daemon, C version (source only).
- Fixed wait() for the emergency shell.
- killall5: ignore signal before doing kill(-1, pid).
2.63 14-Jun-1996
- Fixed preinst script for Debian
- Fixed init.c to become init daemon if name is init.new
- Fixed pidof to not return PIDs of shell scripts
2.62-2 09-Jun-1996
- Changed debian /etc/init.d/boot script to create a nologin file
at boot and to remove it just before going multiuser.
2.62 31-May-1996
- Decided to release a 2.62 version with a BIG WARNING about upgrading
init in it. Will send a patch to Linus for the linux/Documentation/Changes
file so that 2.62 or later is mentioned as the version to upgrade to.
- Added docs for Slackware
2.61-3 29-May-1996
- Fixed debian/etc/init.d/network for the lo device.
- Added "-xdev" to the cd /tmp && find in debian/etc/init.d/boot
- Made remove time for files in /tmp configurable.
2.61 29-Apr-1996
- Changed /etc/init.d/boot script again
- Fixed problem in init.c with trailing whitespace after entries in inittab
- Fixed killall5 problems
- Added manpage for lastb
- Added SHELL= environment variable to sulogin
- Fixed sulogin & shadow problems
- Added timeout option to sulogin
2.60-2 16-Apr-1996
- Fixed sulogin (didn't work if root wasn't first entry in shadow file)
- Fixed mesg for systems with "tty" group (such as Debian)
- Fixed nsyslog() in killall5.c
2.60 01-Apr-1996
- Fixed race condition in init.c, resulting in hanging shutdowns.
Courtesy of Max Neunhoeffer <Max.Neunhoeffer@urz.uni-heidelberg.de>.
- Fixed debian/etc/init.d/boot for swapon and mdadd
- Added architecture to debian.control
- Added manpages for rc.boot and rc.local
- Updated inittab manpage for 4-character runlevel field
- Added debian replaces for bsdutils < version_without_mesg
- Fixed init.c so that it also works with kernels 1.3.81 and up
2.59 10-Mar-1996
- Init logs less to syslog (suspected to hang in syslog() or openlog() )
- removed closelog() from init.c
- removed time check of runlevel record in halt.
- Added options to last to get hostname from ut_addr field
- Added last and mesg to installation targets
- rewrote /etc/init.d/boot a bit.
2.58-2 04-Jan-1996
- Changed etc/init.d/rc to do a stty onlcr
- Added /var/log/initrunlvl symlink
2.58-1 31-Dec-1995
- Added the latest debian files.
- Added support for 4-character id fields (if you have libc5).
- Fixed pidof (in killall5) parsing of /proc/.../stat
- Save restore GMT setting in /etc/init.d/boot
2.57d 03-Dec-1995
- Added sulogin
- Added "-b" flag to init, gives a shell before
anything else (in case the startup scripts are screwed)
- Moved fastboot to /fastboot
- Folded in Debian patches.
- Removed old scripts
- Added debian /etc/directory.
2.57c 08-Oct-1995
- Changed over to init_request (with initreq.h)
- Processes no longer killed when "process" field
changes, change takes effect after next respawn.
2.57b xx-Aug-1995
- Bugfix release for Debian and Slackware 3.0
2.57a 10-Jul-1995
- Fixed race condition init init.c wrt got_chld
- Fixed one-off for malloc in killall5.c
- Changed dowall.c
- Console code: no relink to /dev/systty on CTRL-ALT-DEL)
2.57 22-May-1995
- Changed a few things here and there, didn't
really document it :)
2.55 17-Jan-1995
- Added option to shutdown to run standalone.
2.54 12-Jan-1995
- Added GNU copyrigh to all *.[ch] files.
- added /etc/initscript
- reboot and halt now call shutdown in runlevels 1-5
- Can run from read-only root (CDROM)
2.53 10-Oct-1994
- Renamed pidof to killall5, updated all scripts to
use killall5 instead of kill -1 ....
- Rewrote scripts to use this, and some general changes.
- Added SysV command line compatibility to shutdown.
2.52 30-Aug-1994
- Added `powerfailnow' keyword, for when UPS battery is low.
- Updated `last'.
- Fixed utmp handling (wrt. CLEAN_UTMP)
TODO:
* Make last compatible with GNU/BSD (long options?)
* update powerd
* remote SIGPWR broadcast? in powerd? (with priv. port)
* remote shutdown
2.50 14-Feb-1994
- Ignores unknown command line arguments.
- Modelled more after the "real" sysVinit
- Lots of changes all over the place.
(like showing runlevel in "ps" listing, logging
runlevel into utmp file etc)
- now using "reliable" signals instead of V7 style.
- Updated all scripts. Examples are in two directories:
etc (normal) and etc-sysv (sysv style scripts).
- runlevel 0 = halt, 1 = single user, 6 = reboot.
- added support for serial console.
- updated Propaganda, manpages.
- added shutdown access control.
2.4 24-May-93
- Send out the official version into the world as
SysVinit-2.4.tar.z.
2.4g 15-May-93
- Changed init to really catch SIGPWR 'cause we
hooked up an UPS to the Linux machine. The
keyword for catching the TreeFingerSalute is
now "ctrlaltdel" instead of "power{wait,fail}".
2.4a 22-Apr-93
- Fixed last to reckognize BSD style wtmp logging.
- Changed init to write wtmp records that are
SysV compliant but are also reckognized by the
BSD last. Added a '+' option to the 'process'
field of inittab, for getties that want to do
their own utmp/wtmp housekeeping (kludge!).
- Now accepts a runlevel on the command line,
and reckognizes the 'auto' argument. (Sets the
environment variable AUTOBOOT to YES)
2.2.3 24-Mar-93
- Ripped out the 'leave' action. To difficult, and
unneeded.
- Going single user now kills _all_ processes.
- Added '-t secs' option to all commands.
- This version is stable enough to post.
2.2 02-Mar-93
- Made wait()'s asynchronous
- Changed whole thing to one big state machine
- Now using 'pseudo levels' # & * for SYSINIT & BOOT
- Added a new type of 'action', called leave. This
process will be executed when the system goes from a
runlevel specified in it's runlevel field to a
level that's not. Nice to bring down NFS and the like.
2.1 28-Jan-93
- Fixed a bug with 'boot' and 'once'.
- Check 'initdefault' for validity.
- Reckognizes "single" as command line argument.
- Retries execvp with 'sh -c exec ..' if command
is a shell script. (shouldn't execvp do this?)
- Added patches to use syslog if defined.
2.0 08-Dec-92
- Rewrote the code totally, so started with a new
version number.
- Dropped Minix support, this code now is Linux - specific.
- With TEST switch on, this init & telinit can
run standalone for test purposes.
1.3, 05-Jul-92
- Got a 386, so installed Linux. Added 'soft' reboot
to be default under linux. Fixed some typos.
1.2, 16-Jun-92
- Bugreport from Michael Haardt ; removed deadlock
and added 'waitpid' instead of 'wait' for SYSV.
1.1, 30-Apr-92
- Read manual wrong: there is no 'action' field called
process, but all entries are of type process. Every
'process' get exec'ed by /bin/sh -c 'exec command'.
- Rapidly respawning processes are caught in the act.
- _SYSV support is really Linux support,
done by poe@daimi.aau.dk on 25-Mar-92.
1.0, 01-Feb-92
- Initial version, very primitive for the Minix
operating system. Required some mods. to the
kernel.

56
current/doc/Install

@ -1,56 +0,0 @@
README for the System V style init, version 2.86
init, shutdown, halt, reboot, wall, last, mesg, runlevel,
killall5, pidof, sulogin.
All programs, files and scripts in this package are covered by
the Gnu Public License, and copyrighted by me.
If you are not using Debian and the debianized package,
you will have to install the new init by hand. You should
be able to drop the binaries into a Slackware or Redhat
system, I think.
Here is a list of preferred directories to install the progs & manpages:
wall.1, last.1, mesg.1 /usr/man/man1
inittab.5, initscript.5 /usr/man/man5
init.8, halt.8, reboot.8,
shutdown.8, powerd.8,
killall5.8, pidof.8,
runlevel.8, sulogin.8 /usr/man/man8
init /sbin/init
inittab /etc/inittab
initscript.sample /etc/initscript.sample
telinit a link (with ln(1) ) to init, either
in /bin or in /sbin.
halt /sbin/halt
reboot a link to /sbin/halt in the same directory
killall5 /sbin/killall5
pidof a link to /sbin/killall5 in the same directory.
runlevel /sbin/runlevel
shutdown /sbin/shutdown.
wall /usr/bin/wall
mesg /usr/bin/mesg
last /usr/bin/last
sulogin /sbin/sulogin
bootlogd /sbin/bootlogd
utmpdump don't install, it's just a debug thingy.
If you already _have_ a "wall" in /bin (the SLS release had, for example)
do _not_ install this wall. Chances are that the wall you are already
using is linked to /bin/write. Either first _remove_ /bin/wall before
installing the new one, or don't install the new one at all.
You might want to create a file called "/etc/shutdown.allow". Read the
manual page on shutdown to find out more about this.
Running from a read-only file system (CDROM?):
o All communication to init goes through the FIFO /dev/initctl.
There should be no problem using a read-only root file system
IF you use a Linux kernel > 1.3.66. Older kernels don't allow
writing to a FIFO on a read-only file system.
Miquel van Smoorenburg <miquels@cistron.nl>

81
current/doc/Propaganda

@ -1,81 +0,0 @@
Propaganda for version 2.58 of sysvinit & utilities
==================================================
NOTE: If you use a standard distribution like Slackware, Debian
or Redhat there probably is no need to upgrade. Installing sysvinit
is only for those that upgrade their system by hand or for people
that create Linux distributions.
Sysvinit is probably the most widely used init package for Linux.
Most distributions use it. sysvinit 2.4 is really a good package,
and it was not the need for bugfixes but the need for more features
that made me work on sysvinit again.
Sysvinit is now a debian package. Debian source packages are not
special in any way -- in fact you can just unpack and compile
it on any other Linux distribution.
There was a 2.50 release of sysvinit but that was not very popular-
some of the included scripts broke with certain shells and other
minor things like that. Unfortunately I was not able to fix this
at the time because I was abroad for some time. Therefore the
description below is a comparison of 2.4 and 2.58 (actually the
same blurb as from the 2.50 announce but updated).
Wrt 2.4, some of the code has been made simpler. Everything, from
halt to reboot to single user mode is now done by shell scripts
that are executed directly by init (from /etc/inittab), so shutdown
does not kill processes anymore and then calls reboot - it merely
does some wall's to the logged in users and then switches to
runlevel 0 (halt), 1 (single user) or 6 (reboot).
I have removed support for the old style scripts; the included
example scripts are the Debian GNU/Linux distribution scripts.
This does not mean that eg the Slackware scripts stop to work;
you can probably drop this init into Slackware 3.0 without problems.
Most people have an entry in inittab to run shutdown when CTRL-ALT-DEL
is pressed; a feature has been added to shutdown to check if a
authorized user is logged in on one of the consoles to see if a
shutdown is allowed. This can be configured with an access file.
Some other general changes:
- utility "runlevel" to read the current and previous runlevel from
/var/run/utmp (it's also shown on the command line if you do a "ps").
- unreckognized options are silently ignored (such as the infamous
"ro" - mount root file system read only).
- if the file /etc/initscript is present it will be used to launch
all programs that init starts (so that you can set a generic
umask, ulimit eg for ALL processes - see initscript.sample).
- A "sulogin" program added that always asks for the root
passsword before entering single user mode.
- A "-b" flag to init that starts a shell at boot time before
_any_ other processing.
- I moved /etc/fastboot to /fastboot - wonder what that's gonna break :)
- I even updated the manpages!
Right, now some boring stuff you already know since it's the same
as in the 2.4 release:
The sysvinit package includes
* a sysv compatible /sbin/init program
* a telinit program (er, just a link to /sbin/init) to change runlevels
* a featureful shutdown
* halt and reboot to assist shutdown
* a very forgiving last utility
* the wall & mesg programs (not installed by default)
* manpages for everything
The new sysv init can be found on:
tsx-11.mit.edu:/pub/linux/sources/sbin as sysvinit-2.58-1.tar.gz
sunsite.unc.edu:/pub/Linux/system/Daemons as sysvinit-2.58-1.tar.gz
It will be moved there in a few days, in the mean time it is
probably in the Incoming directory.
Mike. (02-Jan-1996)

19
current/doc/bootlogd.README

@ -1,19 +0,0 @@
bootlogd: a way to capture all console output during bootup
in a logfile.
- bootlogd opens /dev/console and finds out what the real console is
with an ioctl() if TIOCCONS is available
- otherwise bootlogd tries to parse /proc/cmdline for console=
kernel command line arguments
- then opens the (most probable) real console
- allocates a pty pair
- redirects console I/O to the pty pair
- then goes in a loop reading from the pty, writing to the real
console and a logfile as soon as a r/w partition is available,
buffering in memory until then.
As soon as bootlogd exits or gets killed, the pty is closed and the
redirection will be automatically undone by the kernel. So that's
pretty safe.

14
current/doc/sysvinit-2.85.lsm

@ -1,14 +0,0 @@
Begin3
Title: sysvinit and utilities
Version: 2.85
Entered-Date: 15APR2003
Description: This is the Linux System V init.
This version can be compiled with glibc 2.0.6 and up.
Author: miquels@cistron.nl (Miquel van Smoorenburg)
Primary-Site: ftp.cistron.nl /pub/people/miquels/software
92K sysvinit-2.85.tar.gz
Alternate-Site: sunsite.unc.edu /pub/Linux/system/daemons/init
92K sysvinit-2.85.tar.gz
Copying-Policy: GPL
Keywords: init shutdown halt reboot
End

14
current/doc/sysvinit-2.86.lsm

@ -1,14 +0,0 @@
Begin3
Title: sysvinit and utilities
Version: 2.86
Entered-Date: 30JUL2004
Description: This is the Linux System V init.
This version can be compiled with glibc 2.0.6 and up.
Author: miquels@cistron.nl (Miquel van Smoorenburg)
Primary-Site: ftp.cistron.nl /pub/people/miquels/software
92K sysvinit-2.86.tar.gz
Alternate-Site: sunsite.unc.edu /pub/Linux/system/daemons/init
92K sysvinit-2.86.tar.gz
Copying-Policy: GPL
Keywords: init shutdown halt reboot
End

39
current/man/bootlogd.8

@ -1,39 +0,0 @@
.TH BOOTLOGD 8 "Jul 21, 2003" "" "Linux System Administrator's Manual"
.SH NAME
bootlogd \- record boot messages
.SH SYNOPSIS
.B /sbin/bootlogd
.RB [ \-d ]
.RB [ \-r ]
.RB [ \-v ]
.RB [ " -l logfile " ]
.RB [ " -p pidfile " ]
.SH DESCRIPTION
\fBBootlogd\fP runs in the background and copies all strings sent to the
\fI/dev/console\fP device to a logfile. If the logfile is not accessible,
the messages will be buffered in-memory until it is.
.SH OPTIONS
.IP \fB\-d\fP
Do not fork and run in the background.
.IP \fB\-r\fP
If there is an existing logfile called \fIlogfile\fP rename it to
\fIlogfile~\fP unless \fIlogfile~\fP already exists.
.IP \fB\-v\fP
Show version.
.IP \fB\-l logfile\fP
Log to this logfile. The default is \fI/var/log/boot\fP.
.IP \fB\-p pidfile\fP
Put process-id in this file. The default is no pidfile.
.SH BUGS
Bootlogd works by redirecting the console output from the console
device. It copies that output to the real console device and a
logfile. There is no standard way to find out the real console device
if you have a new-style \fI/dev/console\fP device (major 5, minor 1).
\fBBootlogd\fP tries to parse the kernel command line, looking for
console= lines and deducts the real console device from that. If that
syntax is ever changed by the kernel, or a console-type is used
bootlogd does not know about, bootlogd will not work.
.SH AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl
.SH "SEE ALSO"
.BR dmesg (8)

35
current/man/bootlogd.8.todo

@ -1,35 +0,0 @@
.TH BOOTLOGD 8 "Aug 24, 1999" "" "Linux System Administrator's Manual"
.SH NAME
bootlogd \- record boot messages
.SH SYNOPSIS
.B /sbin/bootlogd
.RB [ \-d ]
.RB [ \-r ]
.RB [ \-v ]
.RB [ " -l logfile " ]
.RB [ " -p pidfile " ]
.SH DESCRIPTION
\fBBootlogd\fP runs in the background and copies all strings sent to the
\fI/dev/console\fP device to a logfile. If the logfile is not accessible,
the messages will be buffered in-memory until it is.
.SH OPTIONS
.IP \fB\-d\fP
Do not fork and run in the background.
.IP \fB\-r\fP
If there is an existing logfile called \fIlogfile\fP rename it to
\fIlogfile~\fP unless \fIlogfile~\fP already exists.
.IP \fB\-v\fP
Show version.
.IP \fB\-l logfile\fP
Log to this logfile. The default is \fI/var/log/boot.log\fP.
.IP \fB\-p pidfile\fP
Put process-id in this file. The default is no pidfile.
.SH NOTES
There is no standard way to find out the real console device if you have
a new-style \fI/dev/console\fP device (major 5, minor 1). \fBBootlogd\fP
might have some difficulties to do this, especially under very old
or very new kernels.
.SH AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl
.SH "SEE ALSO"
.BR dmesg (8)

102
current/man/halt.8

@ -1,102 +0,0 @@
.\"{{{}}}
.\"{{{ Title
.TH HALT 8 "Nov 6, 2001" "" "Linux System Administrator's Manual"
.\"}}}
.\"{{{ Name
.SH NAME
halt, reboot, poweroff \- stop the system.
.\"}}}
.\"{{{ Synopsis
.SH SYNOPSIS
.B /sbin/halt
.RB [ \-n ]
.RB [ \-w ]
.RB [ \-d ]
.RB [ \-f ]
.RB [ \-i ]
.RB [ \-p ]
.RB [ \-h ]
.br
.B /sbin/reboot
.RB [ \-n ]
.RB [ \-w ]
.RB [ \-d ]
.RB [ \-f ]
.RB [ \-i ]
.br
.B /sbin/poweroff
.RB [ \-n ]
.RB [ \-w ]
.RB [ \-d ]
.RB [ \-f ]
.RB [ \-i ]
.RB [ \-h ]
.\"}}}
.\"{{{ Description
.SH DESCRIPTION
\fBHalt\fP notes that the system is being brought down in the file
\fI/var/log/wtmp\fP, and then either tells the kernel to halt, reboot or
poweroff the system.
.PP
If \fBhalt\fP or \fBreboot\fP is called when the system is
\fInot\fP in runlevel \fB0\fP or \fB6\fP, in other words when it's running
normally, \fBshutdown\fP will be invoked instead (with the \fB-h\fP
or \fB-r\fP flag). For more info see the \fBshutdown\fP(8)
manpage.
.PP
The rest of this manpage describes the behaviour in runlevels 0
and 6, that is when the systems shutdown scripts are being run.
.\"}}}
.\"{{{ Options
.SH OPTIONS
.IP \fB\-n\fP
Don't sync before reboot or halt.
.IP \fB\-w\fP
Don't actually reboot or halt but only write the wtmp record
(in the \fI/var/log/wtmp\fP file).
.IP \fB\-d\fP
Don't write the wtmp record. The \fB\-n\fP flag implies \fB\-d\fP.
.IP \fB\-f\fP
Force halt or reboot, don't call \fBshutdown\fP(8).
.IP \fB\-i\fP
Shut down all network interfaces just before halt or reboot.
.IP \fB\-h\fP
Put all harddrives on the system in standby mode just before halt or poweroff.
.IP \fB\-p\fP
When halting the system, do a poweroff. This is the default when halt is
called as \fBpoweroff\fP.
.\"}}}
.\"{{{ Diagnostics
.SH DIAGNOSTICS
If you're not the superuser, you will get the message `must be superuser'.
.\"}}}
.\"{{{ Notes
.SH NOTES
Under older \fBsysvinit\fP releases , \fBreboot\fP and \fBhalt\fP should
never be called directly. From release 2.74 on \fBhalt\fP and \fBreboot\fP
invoke \fBshutdown\fP(8) if the system is not in runlevel 0 or 6. This
means that if \fBhalt\fP or \fBreboot\fP cannot find out the current
runlevel (for example, when \fI/var/run/utmp\fP hasn't been initialized
correctly) \fBshutdown\fP will be called, which might not be what you want.
Use the \fB-f\fP flag if you want to do a hard \fBhalt\fP or \fBreboot\fP.
.PP
The \fB-h\fP flag puts all harddisks in standby mode just before halt
or poweroff. Right now this is only implemented for IDE drives. A side
effect of putting the drive in standby mode is that the write cache
on the disk is flushed. This is important for IDE drives, since the
kernel doesn't flush the write-cache itself before poweroff.
.PP
The \fBhalt\fP program uses /proc/ide/hd* to find all IDE disk devices,
which means that /proc needs to be mounted when \fBhalt\fP or
\fBpoweroff\fP is called or the \fB-h\fP switch will do nothing.
.PP
.\"}}}
.\"{{{ Author
.SH AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl
.\"}}}
.\"{{{ See also
.SH "SEE ALSO"
.BR shutdown (8),
.BR init (8)
.\"}}}

284
current/man/init.8

@ -1,284 +0,0 @@
.\"{{{}}}
.\"{{{ Title
.TH INIT 8 "29 Jul 2004" "" "Linux System Administrator's Manual"
.\"}}}
.\"{{{ Name
.SH NAME
init, telinit \- process control initialization
.\"}}}
.\"{{{ Synopsis
.SH SYNOPSIS
.B /sbin/init
.RB [ " -a " ]
.RB [ " -s " ]
.RB [ " -b " ]
.RB [ " -z xxx " ]
.RB [ " 0123456Ss " ]
.br
.B /sbin/telinit
.RB [ " \-t sec " ]
.RB [ " 0123456sSQqabcUu " ]
.\"}}}
.\"{{{ Description
.SH DESCRIPTION
.\"{{{ init
.SS Init
.B Init
is the parent of all processes. Its primary role is to create processes
from a script stored in the file \fB/etc/inittab\fP (see
\fIinittab\fP(5)). This file usually has entries which cause \fBinit\fP
to spawn \fBgetty\fPs on each line that users can log in. It also
controls autonomous processes required by any particular system.
.PP
.\"{{{ Runlevels
.SH RUNLEVELS
A \fIrunlevel\fP is a software configuration of the system which allows
only a selected group of processes to exist. The processes spawned by
\fBinit\fP for each of these runlevels are defined in the
\fB/etc/inittab\fP file. \fBInit\fP can be in one of eight runlevels:
\fB0\(en6\fP and \fBS\fP or \fBs\fP. The runlevel is
changed by having a privileged user run \fBtelinit\fP, which sends
appropriate signals to \fBinit\fP, telling it which runlevel to change
to.
.PP
Runlevels \fB0\fP, \fB1\fP, and \fB6\fP are reserved. Runlevel 0 is used to
halt the system, runlevel 6 is used to reboot the system, and runlevel
1 is used to get the system down into single user mode. Runlevel \fBS\fP
is not really meant to be used directly, but more for the scripts that are
executed when entering runlevel 1. For more information on this,
see the manpages for \fBshutdown\fP(8) and \fBinittab\fP(5).
.PP
Runlevels 7-9 are also valid, though not really documented. This is
because "traditional" Unix variants don't use them.
In case you're curious, runlevels \fIS\fP and \fIs\fP are in fact the same.
Internally they are aliases for the same runlevel.
.\"}}}
.PP
.SH BOOTING
After \fBinit\fP is invoked as the last step of the kernel boot sequence,
it looks for the file \fB/etc/inittab\fP to see if there is an entry of the
</