summaryrefslogtreecommitdiff
path: root/packages/sysvinit
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/sysvinit
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/sysvinit')
-rw-r--r--packages/sysvinit/.mtn2git_empty0
-rw-r--r--packages/sysvinit/sysvinit-2.86/.mtn2git_empty0
-rw-r--r--packages/sysvinit/sysvinit-2.86/install.patch77
-rw-r--r--packages/sysvinit/sysvinit-2.86/sysvinit-2.86.patch4880
-rw-r--r--packages/sysvinit/sysvinit/.mtn2git_empty0
-rwxr-xr-x[-rw-r--r--]packages/sysvinit/sysvinit/bootlogd.init85
-rw-r--r--packages/sysvinit/sysvinit/inittab2
-rw-r--r--packages/sysvinit/sysvinit/mnci/.mtn2git_empty0
-rw-r--r--packages/sysvinit/sysvinit/mnci/inittab11
-rw-r--r--packages/sysvinit/sysvinit/need6
-rw-r--r--packages/sysvinit/sysvinit/nslu2/.mtn2git_empty0
-rw-r--r--packages/sysvinit/sysvinit/nslu2/rcS-default23
-rw-r--r--packages/sysvinit/sysvinit/openmn/.mtn2git_empty0
-rwxr-xr-x[-rw-r--r--]packages/sysvinit/sysvinit/openmn/rcS79
-rw-r--r--packages/sysvinit/sysvinit/postinst17
-rw-r--r--packages/sysvinit/sysvinit/prerm9
-rw-r--r--packages/sysvinit/sysvinit/provide6
-rwxr-xr-x[-rw-r--r--]packages/sysvinit/sysvinit/rc102
-rwxr-xr-x[-rw-r--r--]packages/sysvinit/sysvinit/rcS0
-rw-r--r--packages/sysvinit/sysvinit/rcS-default19
-rw-r--r--packages/sysvinit/sysvinit/rt3000/.mtn2git_empty0
-rw-r--r--packages/sysvinit/sysvinit/rt3000/inittab12
22 files changed, 5327 insertions, 1 deletions
diff --git a/packages/sysvinit/.mtn2git_empty b/packages/sysvinit/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/sysvinit/.mtn2git_empty
diff --git a/packages/sysvinit/sysvinit-2.86/.mtn2git_empty b/packages/sysvinit/sysvinit-2.86/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/sysvinit/sysvinit-2.86/.mtn2git_empty
diff --git a/packages/sysvinit/sysvinit-2.86/install.patch b/packages/sysvinit/sysvinit-2.86/install.patch
index e69de29bb2..01c1367c03 100644
--- a/packages/sysvinit/sysvinit-2.86/install.patch
+++ b/packages/sysvinit/sysvinit-2.86/install.patch
@@ -0,0 +1,77 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- sysvinit-2.85/src/Makefile~install
++++ sysvinit-2.85/src/Makefile
+@@ -47,7 +47,15 @@
+ BIN_GROUP = root
+ BIN_COMBO = $(BIN_OWNER):$(BIN_GROUP)
+ INSTALL = install -o $(BIN_OWNER) -g $(BIN_GROUP)
+-MANDIR = /usr/share/man
++
++ROOT =
++bindir = /bin
++sbindir = /sbin
++usrbindir = /usr/bin
++usrbindir = /usr/bin
++includedir = /usr/include
++mandir = /usr/share/man
++
+
+ # Additional libs for GNU libc.
+ ifneq ($(wildcard /usr/lib/libcrypt.a),)
+@@ -110,32 +118,39 @@
+ distclean: clobber
+
+ install:
++ install -d $(ROOT)$(bindir)
+ for i in $(BIN); do \
+- $(INSTALL) -m 755 $$i $(ROOT)/bin/; \
++ $(INSTALL) -m 755 $$i $(ROOT)$(bindir)/; \
+ done
++ install -d $(ROOT)$(sbindir)
+ for i in $(SBIN); do \
+- $(INSTALL) -m 755 $$i $(ROOT)/sbin/; \
++ $(INSTALL) -m 755 $$i $(ROOT)$(sbindir)/; \
+ done
++ install -d $(ROOT)$(usrbindir)
+ for i in $(USRBIN); do \
+- $(INSTALL) -m 755 $$i $(ROOT)/usr/bin/; \
++ $(INSTALL) -m 755 $$i $(ROOT)$(usrbindir)/; \
+ done
+ # $(INSTALL) -m 755 etc/initscript.sample $(ROOT)/etc/
+- ln -sf halt $(ROOT)/sbin/reboot
+- ln -sf halt $(ROOT)/sbin/poweroff
+- ln -sf init $(ROOT)/sbin/telinit
+- ln -sf ../sbin/killall5 $(ROOT)/bin/pidof
+- if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
+- ln -sf last $(ROOT)/usr/bin/lastb; \
++ ln -sf halt $(ROOT)$(sbindir)/reboot
++ ln -sf halt $(ROOT)$(sbindir)/poweroff
++ ln -sf init $(ROOT)$(sbindir)/telinit
++ ln -sf ../sbin/killall5 $(ROOT)$(bindir)/pidof
++ if [ ! -f $(ROOT)$(usrbindir)/lastb ]; then \
++ ln -sf last $(ROOT)$(usrbindir)/lastb; \
+ fi
+- $(INSTALL) -m 644 initreq.h $(ROOT)/usr/include/
++ install -d $(ROOT)$(includedir)
++ $(INSTALL) -m 644 initreq.h $(ROOT)$(includedir)/
++ install -d $(ROOT)$(mandir)/man1 \
++ $(ROOT)$(mandir)/man5 \
++ $(ROOT)$(mandir)/man8
+ for i in $(MAN1); do \
+- $(INSTALL) -m 644 ../man/$$i $(ROOT)$(MANDIR)/man1/; \
++ $(INSTALL) -m 644 ../man/$$i $(ROOT)$(mandir)/man1/; \
+ done
+ for i in $(MAN5); do \
+- $(INSTALL) -m 644 ../man/$$i $(ROOT)$(MANDIR)/man5/; \
++ $(INSTALL) -m 644 ../man/$$i $(ROOT)$(mandir)/man5/; \
+ done
+ for i in $(MAN8); do \
+- $(INSTALL) -m 644 ../man/$$i $(ROOT)$(MANDIR)/man8/; \
++ $(INSTALL) -m 644 ../man/$$i $(ROOT)$(mandir)/man8/; \
+ done
+ ifeq ($(ROOT),)
+ #
diff --git a/packages/sysvinit/sysvinit-2.86/sysvinit-2.86.patch b/packages/sysvinit/sysvinit-2.86/sysvinit-2.86.patch
index e69de29bb2..b83f525c3e 100644
--- a/packages/sysvinit/sysvinit-2.86/sysvinit-2.86.patch
+++ b/packages/sysvinit/sysvinit-2.86/sysvinit-2.86.patch
@@ -0,0 +1,4880 @@
+diff -urNd -urNd sysvinit-2.85/COPYRIGHT sysvinit-2.86/COPYRIGHT
+--- sysvinit-2.85/COPYRIGHT 2003-04-15 03:45:44.000000000 -0500
++++ sysvinit-2.86/COPYRIGHT 2004-07-30 07:12:12.000000000 -0500
+@@ -1,4 +1,4 @@
+-Sysvinit is Copyright (C) 1991-2003 Miquel van Smoorenburg
++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
+diff -urNd -urNd sysvinit-2.85/doc/Changelog sysvinit-2.86/doc/Changelog
+--- sysvinit-2.85/doc/Changelog 2003-04-15 09:37:58.000000000 -0500
++++ sysvinit-2.86/doc/Changelog 2004-07-30 07:15:06.000000000 -0500
+@@ -1,3 +1,29 @@
++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)
+diff -urNd -urNd sysvinit-2.85/doc/Install sysvinit-2.86/doc/Install
+--- sysvinit-2.85/doc/Install 2003-04-15 03:46:49.000000000 -0500
++++ sysvinit-2.86/doc/Install 2004-07-30 07:15:40.000000000 -0500
+@@ -1,5 +1,5 @@
+
+- README for the System V style init, version 2.85
++ README for the System V style init, version 2.86
+
+ init, shutdown, halt, reboot, wall, last, mesg, runlevel,
+ killall5, pidof, sulogin.
+diff -urNd -urNd sysvinit-2.85/doc/bootlogd.README sysvinit-2.86/doc/bootlogd.README
+--- sysvinit-2.85/doc/bootlogd.README 2000-09-12 16:54:31.000000000 -0500
++++ sysvinit-2.86/doc/bootlogd.README 2004-06-09 07:47:45.000000000 -0500
+@@ -1,10 +1,12 @@
+
+ bootlogd: a way to capture all console output during bootup
+- in a logfile. ** PROOF OF CONCEPT IMPLEMENTATION **
++ in a logfile.
+
+-- bootlogd opens /dev/console
+-- finds out what the real console is with an ioctl()
+-- then opens the real console
++- 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
+diff -urNd -urNd sysvinit-2.85/doc/sysvinit-2.85.lsm sysvinit-2.86/doc/sysvinit-2.85.lsm
+--- sysvinit-2.85/doc/sysvinit-2.85.lsm 2003-04-18 16:04:12.000000000 -0500
++++ sysvinit-2.86/doc/sysvinit-2.85.lsm 2004-06-09 07:47:45.000000000 -0500
+@@ -1,7 +1,7 @@
+ Begin3
+ Title: sysvinit and utilities
+ Version: 2.85
+-Entered-Date: 18APR2003
++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)
+diff -urNd -urNd sysvinit-2.85/doc/sysvinit-2.86.lsm sysvinit-2.86/doc/sysvinit-2.86.lsm
+--- sysvinit-2.85/doc/sysvinit-2.86.lsm 1969-12-31 18:00:00.000000000 -0600
++++ sysvinit-2.86/doc/sysvinit-2.86.lsm 2004-07-31 08:35:28.000000000 -0500
+@@ -0,0 +1,14 @@
++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
+diff -urNd -urNd sysvinit-2.85/man/bootlogd.8 sysvinit-2.86/man/bootlogd.8
+--- sysvinit-2.85/man/bootlogd.8 1969-12-31 18:00:00.000000000 -0600
++++ sysvinit-2.86/man/bootlogd.8 2004-06-09 07:47:45.000000000 -0500
+@@ -0,0 +1,39 @@
++.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)
+diff -urNd -urNd sysvinit-2.85/man/init.8 sysvinit-2.86/man/init.8
+--- sysvinit-2.85/man/init.8 2003-04-18 16:05:03.000000000 -0500
++++ sysvinit-2.86/man/init.8 2004-07-29 06:21:31.000000000 -0500
+@@ -1,6 +1,6 @@
+ .\"{{{}}}
+ .\"{{{ Title
+-.TH INIT 8 "18 April 2003" "" "Linux System Administrator's Manual"
++.TH INIT 8 "29 Jul 2004" "" "Linux System Administrator's Manual"
+ .\"}}}
+ .\"{{{ Name
+ .SH NAME
+@@ -160,7 +160,7 @@
+ .SH ENVIRONMENT
+ \fBInit\fP sets the following environment variables for all its children:
+ .IP \fBPATH\fP
+-\fI/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin\fP
++\fI/bin:/usr/bin:/sbin:/usr/sbin\fP
+ .IP \fBINIT_VERSION\fP
+ As the name says. Useful to determine if a script runs directly from \fBinit\fP.
+ .IP \fBRUNLEVEL\fP
+diff -urNd -urNd sysvinit-2.85/man/initscript.5 sysvinit-2.86/man/initscript.5
+--- sysvinit-2.85/man/initscript.5 1999-12-24 16:31:21.000000000 -0600
++++ sysvinit-2.86/man/initscript.5 2004-06-09 07:47:45.000000000 -0500
+@@ -1,4 +1,4 @@
+-.TH INITSCRIPT 5 "December 24, 1999" "" "Linux System Administrator's Manual"
++.TH INITSCRIPT 5 "July 10, 2003" "" "Linux System Administrator's Manual"
+ .SH NAME
+ initscript \- script that executes inittab commands.
+ .SH SYNOPSIS
+@@ -40,6 +40,12 @@
+
+ .sp
+ .RE
++.SH NOTES
++This script is not meant as startup script for daemons or somesuch.
++It has nothing to do with a \fIrc.local\fP style script. It's just
++a handler for things executed from \fB/etc/inittab\fP. Experimenting
++with this can make your system un(re)bootable.
++.RE
+ .SH FILES
+ /etc/inittab,
+ /etc/initscript.
+diff -urNd -urNd sysvinit-2.85/man/killall5.8 sysvinit-2.86/man/killall5.8
+--- sysvinit-2.85/man/killall5.8 1997-05-27 05:34:21.000000000 -0500
++++ sysvinit-2.86/man/killall5.8 2004-06-09 07:47:45.000000000 -0500
+@@ -1,4 +1,4 @@
+-.TH KILLALL5 8 "27 May 1997" "" "Linux System Administrator's Manual"
++.TH KILLALL5 8 "04 Nov 2003" "" "Linux System Administrator's Manual"
+ .SH NAME
+ killall5 -- send a signal to all processes.
+ .SH SYNOPSIS
+@@ -7,9 +7,9 @@
+ .SH DESCRIPTION
+ .B killall5
+ is the SystemV killall command. It sends a signal to all processes except
+-the processes in its own session, so it won't kill the shell that is
+-running the script it was called from. Its primary (only) use is in the
+-\fBrc\fP scripts found in the /etc/init.d directory.
++kernel threads and the processes in its own session, so it won't kill
++the shell that is running the script it was called from. Its primary
++(only) use is in the \fBrc\fP scripts found in the /etc/init.d directory.
+ .SH SEE ALSO
+ .BR halt (8),
+ .BR reboot (8)
+diff -urNd -urNd sysvinit-2.85/man/last.1 sysvinit-2.86/man/last.1
+--- sysvinit-2.85/man/last.1 1999-07-29 05:50:34.000000000 -0500
++++ sysvinit-2.86/man/last.1 2004-07-30 06:39:18.000000000 -0500
+@@ -1,6 +1,6 @@
+ .\"{{{}}}
+ .\"{{{ Title
+-.TH LAST,LASTB 1 "Jul 29, 1999" "" "Linux System Administrator's Manual"
++.TH LAST,LASTB 1 "Jul 31, 2004" "" "Linux System Administrator's Manual"
+ .\"}}}
+ .\"{{{ Name
+ .SH NAME
+@@ -14,6 +14,7 @@
+ .RB "[ \-\fBn\fP \fInum\fP ]"
+ .RB [ \-adiox ]
+ .RB "[ \-\fBf\fP \fIfile\fP ]"
++.RB "[ \-\fBt\fP \fIYYYYMMDDHHMMSS\fP ]"
+ .RI [ name... ]
+ .RI [ tty... ]
+ .br
+@@ -54,6 +55,11 @@
+ This is a count telling \fBlast\fP how many lines to show.
+ .IP "\fB\-n\fP \fInum\fP"
+ The same.
++.IP "\fB\-t\fP \fIYYYYMMDDHHMMSS\fP"
++Display the state of logins as of the specified time. This is
++useful, e.g., to determine easily who was logged in at a particular
++time -- specify that time with \fB\-t\fP and look for "still logged
++in".
+ .IP \fB\-R\fP
+ Suppresses the display of the hostname field.
+ .IP \fB\-a\fP
+diff -urNd -urNd sysvinit-2.85/man/mesg.1 sysvinit-2.86/man/mesg.1
+--- sysvinit-2.85/man/mesg.1 2001-02-26 06:01:10.000000000 -0600
++++ sysvinit-2.86/man/mesg.1 2004-06-09 07:47:45.000000000 -0500
+@@ -27,7 +27,7 @@
+ If no option is given, \fBmesg\fP prints out the current access state of your
+ terminal.
+ .PP NOTES
+-\fBMesg\fP assumes that it's standard input is connected to your
++\fBMesg\fP assumes that its standard input is connected to your
+ terminal. That also means that if you are logged in multiple times,
+ you can get/set the mesg status of other sessions by using redirection.
+ For example "mesg n < /dev/pts/46".
+diff -urNd -urNd sysvinit-2.85/man/mountpoint.1 sysvinit-2.86/man/mountpoint.1
+--- sysvinit-2.85/man/mountpoint.1 1969-12-31 18:00:00.000000000 -0600
++++ sysvinit-2.86/man/mountpoint.1 2004-06-09 07:47:45.000000000 -0500
+@@ -0,0 +1,37 @@
++.TH MOUNTPOINT 8 "Mar 15, 2004" "" "Linux System Administrator's Manual"
++.SH NAME
++mountpoint \- see if a directory is a mountpoint
++.SH SYNOPSIS
++.B /bin/mountpoint
++.RB [ \-q ]
++.RB [ \-d ]
++.I /path/to/directory
++.br
++.B /bin/mountpoint
++.RB \-x
++.I /dev/device
++.SH DESCRIPTION
++\fBMountpoint\fP checks if the directory is a mountpoint.
++
++.SH OPTIONS
++.IP \fB\-q\fP
++Be quiet - don't print anything.
++.IP \fB\-d\fP
++Print major/minor device number of the filesystem on stdout.
++.IP \fB\-x\fP
++Print major/minor device number of the blockdevice on stdout.
++.SH EXIT STATUS
++Zero if the directory is a mountpoint, non-zero if not.
++.SH NOTES
++Symbolic links are not followed, except when the \fB-x\fP option is
++used. To force following symlinks, add a trailing slash to the
++path of the directory.
++.PP
++The name of the command is misleading when the -x option is used,
++but the option is useful for comparing if a directory and a device
++match up, and there is no other command that can print the info easily.
++.PP
++.SH AUTHOR
++Miquel van Smoorenburg, miquels@cistron.nl
++.SH "SEE ALSO"
++.BR stat (1)
+diff -urNd -urNd sysvinit-2.85/man/shutdown.8 sysvinit-2.86/man/shutdown.8
+--- sysvinit-2.85/man/shutdown.8 2001-10-02 16:27:50.000000000 -0500
++++ sysvinit-2.86/man/shutdown.8 2004-06-09 07:47:45.000000000 -0500
+@@ -1,6 +1,6 @@
+ .\"{{{}}}
+ .\"{{{ Title
+-.TH SHUTDOWN 8 "Juli 31, 2001" "" "Linux System Administrator's Manual"
++.TH SHUTDOWN 8 "November 12, 2003" "" "Linux System Administrator's Manual"
+ .\"}}}
+ .\"{{{ Name
+ .SH NAME
+@@ -11,7 +11,7 @@
+ .B /sbin/shutdown
+ .RB [ \-t
+ .IR sec ]
+-.RB [ \-arkhncfF ]
++.RB [ \-arkhncfFHP ]
+ .I time
+ .RI [ warning-message ]
+ .\"}}}
+@@ -54,7 +54,16 @@
+ .\"}}}
+ .\"{{{ -h
+ .IP \fB\-h\fP
+-Halt after shutdown.
++Halt or poweroff after shutdown.
++.\"}}}
++.\"{{{ -H
++.IP \fB\-H\fP
++Halt action is to halt or drop into boot monitor on systems that
++support it.
++.\"}}}
++.\"{{{ -P
++.IP \fB\-P\fP
++Halt action is to turn off the power.
+ .\"}}}
+ .\"{{{ -n
+ .IP \fB\-n\fP
+@@ -141,6 +150,14 @@
+ .sp 1
+ Note that if \fI/etc/shutdown.allow\fP is not present, the \fB-a\fP
+ argument is ignored.
++.SH HALT OR POWEROFF
++The \fB-H\fP option just sets the \fIinit\fP environment variable
++\fIINIT_HALT\fP to \fIHALT\fP, and the \fB-P\fP option just sets
++that variable to \fIPOWEROFF\fP. The shutdown script that calls
++\fBhalt\fP(8) as the last thing in the shutdown sequence should
++check these environment variables and call \fBhalt\fP(8) with
++the right options for these options to actually have any effect.
++Debian 3.1 (sarge) supports this.
+ .SH FILES
+ .nf
+ /fastboot
+diff -urNd -urNd sysvinit-2.85/man/sulogin.8 sysvinit-2.86/man/sulogin.8
+--- sysvinit-2.85/man/sulogin.8 2000-09-11 07:19:25.000000000 -0500
++++ sysvinit-2.86/man/sulogin.8 2004-06-09 07:47:45.000000000 -0500
+@@ -1,4 +1,4 @@
+-.TH SULOGIN 8 "11 Sep 2000" "" "Linux System Administrator's Manual"
++.TH SULOGIN 8 "04 Nov 2003" "" "Linux System Administrator's Manual"
+ .SH NAME
+ sulogin -- Single-user login
+ .SH SYNOPSIS
+@@ -20,7 +20,7 @@
+ .br
+ (or type Control-D for normal startup):
+ .PP
+-\fIsulogin\fP will connected to the current terminal, or to the
++\fIsulogin\fP will be connected to the current terminal, or to the
+ optional device that can be specified on the command line
+ (typically \fB/dev/console\fP).
+ .PP
+@@ -45,16 +45,18 @@
+ .PP
+ boot: linux -b rw sushell=/sbin/sash
+ .SH FALLBACK METHODS
+-\fIsulogin\fP checks the root password using the standard methods first.
+-If the \fB-e\fP option was specified,
+-\fIsulogin\fP examines the next files to find the root password. If
+-they are damaged, or non-existant, it will use fallback methods that
+-even go so far as to provide you with a shell prompt without asking
+-for the root password if they are irrepairably damaged.
++\fIsulogin\fP checks the root password using the standard method (getpwnam)
++first.
++Then, if the \fB-e\fP option was specified,
++\fIsulogin\fP examines these files directly to find the root password:
+ .PP
+ /etc/passwd,
+ .br
+ /etc/shadow (if present)
++.PP
++If they are damaged or non-existant, sulogin will start a root shell
++without asking for a password. Only use the \fB-e\fP option if you
++are sure the console is physically protected against unauthorized access.
+ .SH AUTHOR
+ Miquel van Smoorenburg <miquels@cistron.nl>
+ .SH SEE ALSO
+diff -urNd -urNd sysvinit-2.85/man/wall.1 sysvinit-2.86/man/wall.1
+--- sysvinit-2.85/man/wall.1 2003-04-16 04:17:38.000000000 -0500
++++ sysvinit-2.86/man/wall.1 2004-06-09 07:47:45.000000000 -0500
+@@ -47,7 +47,7 @@
+ .I Wall
+ ignores the
+ .B TZ
+-variable - the time printed in the banner is based on the systems
++variable - the time printed in the banner is based on the system's
+ local time.
+
+ .SH SEE ALSO
+diff -urNd -urNd sysvinit-2.85/src/Makefile sysvinit-2.86/src/Makefile
+--- sysvinit-2.85/src/Makefile 2001-11-06 05:58:16.000000000 -0600
++++ sysvinit-2.86/src/Makefile 2004-06-09 07:47:45.000000000 -0500
+@@ -5,34 +5,56 @@
+ # clean cleans up object files
+ # clobber really cleans up
+ #
+-# Version: @(#)Makefile 2.83-3 06-Nov-2001 miquels@cistron.nl
++# Version: @(#)Makefile 2.85-13 23-Mar-2004 miquels@cistron.nl
+ #
+
+-CC = cc
+-CFLAGS = -Wall -O2 -D_GNU_SOURCE
++CC = gcc
++CFLAGS = -Wall -O2 -fomit-frame-pointer -D_GNU_SOURCE
+ LDFLAGS = -s
+ STATIC =
+
+-# For Debian we do not build all programs, otherwise we do.
+-ifeq ($(DEBIAN),)
+-PROGS = init halt shutdown killall5 runlevel sulogin utmpdump \
+- last mesg wall
+-else
+-PROGS = init halt shutdown killall5 runlevel sulogin last mesg
++# For some known distributions we do not build all programs, otherwise we do.
++BIN =
++SBIN = init halt shutdown runlevel killall5
++USRBIN = last mesg
++
++MAN1 = last.1 lastb.1 mesg.1
++MAN5 = initscript.5 inittab.5
++MAN8 = halt.8 init.8 killall5.8 pidof.8 poweroff.8 reboot.8 runlevel.8
++MAN8 += shutdown.8 telinit.8
++
++ifeq ($(DISTRO),)
++BIN += mountpoint
++SBIN += sulogin bootlogd
++USRBIN += utmpdump wall
++MAN1 += mountpoint.1 wall.1
++MAN8 += sulogin.8 bootlogd.8
++endif
++
++ifeq ($(DISTRO),Debian)
++BIN += mountpoint
++SBIN += sulogin bootlogd
++MAN1 += mountpoint.1
++MAN8 += sulogin.8 bootlogd.8
++endif
++
++ifeq ($(DISTRO),Owl)
++USRBIN += wall
++MAN1 += wall.1
+ endif
+
+ BIN_OWNER = root
+ BIN_GROUP = root
+-BIN_COMBO = $(BIN_OWNER).$(BIN_GROUP)
++BIN_COMBO = $(BIN_OWNER):$(BIN_GROUP)
+ INSTALL = install -o $(BIN_OWNER) -g $(BIN_GROUP)
+ MANDIR = /usr/share/man
+
+-# Additional libs for Gnu Libc
++# Additional libs for GNU libc.
+ ifneq ($(wildcard /usr/lib/libcrypt.a),)
+ LCRYPT = -lcrypt
+ endif
+
+-all: $(PROGS)
++all: $(BIN) $(SBIN) $(USRBIN)
+
+ init: init.o init_utmp.o
+ $(CC) $(LDFLAGS) $(STATIC) -o $@ init.o init_utmp.o
+@@ -46,6 +68,9 @@
+ mesg: mesg.o
+ $(CC) $(LDFLAGS) -o $@ mesg.o
+
++mountpoint: mountpoint.o
++ $(CC) $(LDFLAGS) -o $@ mountpoint.o
++
+ utmpdump: utmpdump.o
+ $(CC) $(LDFLAGS) -o $@ utmpdump.o
+
+@@ -62,9 +87,9 @@
+ $(CC) $(LDFLAGS) -o $@ dowall.o shutdown.o utmp.o
+
+ bootlogd: bootlogd.o
+- $(CC) $(LDFLAGS) -o $@ bootlogd.o
++ $(CC) $(LDFLAGS) -o $@ bootlogd.o -lutil
+
+-init.o: init.c init.h set.h reboot.h
++init.o: init.c init.h set.h reboot.h initreq.h
+ $(CC) -c $(CFLAGS) init.c
+
+ utmp.o: utmp.c init.h
+@@ -80,36 +105,44 @@
+ @echo Type \"make clobber\" to really clean up.
+
+ clobber: cleanobjs
+- rm -f $(PROGS)
++ rm -f $(BIN) $(SBIN) $(USRBIN)
+
+ distclean: clobber
+
+ install:
+- $(INSTALL) -m 755 halt init killall5 sulogin \
+- runlevel shutdown $(ROOT)/sbin
+- # These are not installed by default
+-ifeq ($(DEBIAN),)
+- $(INSTALL) -m 555 utmpdump wall $(ROOT)/usr/bin
+-endif
+- # $(INSTALL) -m 755 etc/initscript.sample $(ROOT)/etc
+- $(INSTALL) -m 755 mesg last $(ROOT)/usr/bin
+- cd $(ROOT)/sbin; ln -sf halt reboot; chown $(BIN_COMBO) reboot
+- cd $(ROOT)/sbin; ln -sf halt poweroff; chown $(BIN_COMBO) poweroff
+- cd $(ROOT)/sbin; ln -sf init telinit; chown $(BIN_COMBO) telinit
+- cd $(ROOT)/bin; ln -sf ../sbin/killall5 pidof; chown $(BIN_COMBO) pidof
+- cd $(ROOT)/usr/bin; ln -sf last lastb; chown $(BIN_COMBO) lastb
+- $(INSTALL) -m 644 initreq.h $(ROOT)/usr/include
+- $(INSTALL) -m 644 ../man/*.8 $(ROOT)$(MANDIR)/man8
+- $(INSTALL) -m 644 ../man/*.5 $(ROOT)$(MANDIR)/man5
+-ifeq ($(DEBIAN),)
+- $(INSTALL) -m 644 ../man/wall.1 $(ROOT)$(MANDIR)/man1
+-endif
+- $(INSTALL) -m 644 ../man/last.1 ../man/lastb.1 ../man/mesg.1 \
+- $(ROOT)$(MANDIR)/man1
++ for i in $(BIN); do \
++ $(INSTALL) -m 755 $$i $(ROOT)/bin/; \
++ done
++ for i in $(SBIN); do \
++ $(INSTALL) -m 755 $$i $(ROOT)/sbin/; \
++ done
++ for i in $(USRBIN); do \
++ $(INSTALL) -m 755 $$i $(ROOT)/usr/bin/; \
++ done
++ # $(INSTALL) -m 755 etc/initscript.sample $(ROOT)/etc/
++ ln -sf halt $(ROOT)/sbin/reboot
++ ln -sf halt $(ROOT)/sbin/poweroff
++ ln -sf init $(ROOT)/sbin/telinit
++ ln -sf ../sbin/killall5 $(ROOT)/bin/pidof
++ if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
++ ln -sf last $(ROOT)/usr/bin/lastb; \
++ fi
++ $(INSTALL) -m 644 initreq.h $(ROOT)/usr/include/
++ for i in $(MAN1); do \
++ $(INSTALL) -m 644 ../man/$$i $(ROOT)$(MANDIR)/man1/; \
++ done
++ for i in $(MAN5); do \
++ $(INSTALL) -m 644 ../man/$$i $(ROOT)$(MANDIR)/man5/; \
++ done
++ for i in $(MAN8); do \
++ $(INSTALL) -m 644 ../man/$$i $(ROOT)$(MANDIR)/man8/; \
++ done
++ifeq ($(ROOT),)
+ #
+- # This part is skipped on debian systems, the
++ # This part is skipped on Debian systems, the
+ # debian.preinst script takes care of it.
+ @if [ ! -p /dev/initctl ]; then \
+ echo "Creating /dev/initctl"; \
+ rm -f /dev/initctl; \
+ mknod -m 600 /dev/initctl p; fi
++endif
+Binary files sysvinit-2.85/src/bootlogd and sysvinit-2.86/src/bootlogd differ
+diff -urNd -urNd sysvinit-2.85/src/bootlogd.c sysvinit-2.86/src/bootlogd.c
+--- sysvinit-2.85/src/bootlogd.c 2001-12-09 08:01:28.000000000 -0600
++++ sysvinit-2.86/src/bootlogd.c 2004-06-09 07:47:45.000000000 -0500
+@@ -3,12 +3,12 @@
+ * The file is usually located on the /var partition, and
+ * gets written (and fsynced) as soon as possible.
+ *
+- * Version: @(#)bootlogd 2.79 11-Sep-2000 miquels@cistron.nl
++ * Version: @(#)bootlogd 2.86pre 12-Jan-2004 miquels@cistron.nl
+ *
+ * Bugs: Uses openpty(), only available in glibc. Sorry.
+ *
+ * This file is part of the sysvinit suite,
+- * Copyright 1991-2000 Miquel van Smoorenburg.
++ * Copyright 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
+@@ -17,7 +17,9 @@
+ *
+ * *NOTE* *NOTE* *NOTE*
+ * This is a PROOF OF CONCEPT IMPLEMENTATION
+- * I do not recommend using this on production systems.
++ *
++ * I have bigger plans for Debian, but for now
++ * this has to do ;)
+ *
+ */
+
+@@ -38,18 +40,14 @@
+ #include <dirent.h>
+ #include <fcntl.h>
+ #include <pty.h>
+-
+-char *Version = "@(#) bootlogd 2.79 11-Sep-2000 MvS";
+-
+-/*
+- * Until the kernel knows about TIOCGDEV, use a really ugly
+- * non-portable (not even between architectures) hack.
+- */
+-#ifndef TIOCGDEV
+-# define TIOCTTYGSTRUCT_HACK 1
++#include <ctype.h>
++#ifdef __linux__
++#include <sys/mount.h>
+ #endif
+
+-#define LOGFILE "/var/log/boot.log"
++char *Version = "@(#) bootlogd 2.86 03-Jun-2004 miquels@cistron.nl";
++
++#define LOGFILE "/var/log/boot"
+
+ char ringbuf[32768];
+ char *endptr = ringbuf + sizeof(ringbuf);
+@@ -59,29 +57,32 @@
+ int got_signal = 0;
+ int didnl = 1;
+
++struct line {
++ char buf[256];
++ int pos;
++} line;
+
+-#ifdef TIOCTTYGSTRUCT_HACK
+-struct tty_offsets {
+- char *kver;
+- int offset;
+-} tty_offsets[] = {
+-#if ((~0UL) == 0xffffffff) /* 32 bits */
+- { "2.0.", 236 },
+- { "2.1.", 268 },
+- { "2.2.", 272 },
+- { "2.3.", 272 },
+- { "2.4.", 272 },
+- { "2.5.", 272 },
+-#else /* 64 bits */
+- { "2.2.", 480 },
+- { "2.3.", 480 },
+- { "2.4.", 480 },
+- { "2.5.", 480 },
+-#endif
+- { NULL, 0 },
++/*
++ * Console devices as listed on the kernel command line and
++ * the mapping to actual devices in /dev
++ */
++struct consdev {
++ char *cmdline;
++ char *dev1;
++ char *dev2;
++} consdev[] = {
++ { "ttySC", "/dev/ttySC%s", "/dev/ttsc/%s" },
++ { "ttyS", "/dev/ttyS%s", "/dev/tts/%s" },
++ { "tty", "/dev/tty%s", "/dev/vc/%s" },
++ { "hvc", "/dev/hvc%s", "/dev/hvc/%s" },
++ { NULL, NULL, NULL },
+ };
+-#endif
+
++/*
++ * Devices to try as console if not found on kernel command line.
++ * Tried from left to right (as opposed to kernel cmdline).
++ */
++char *defcons[] = { "tty0", "hvc0", "ttyS0", "ttySC0", NULL };
+
+ /*
+ * Catch signals.
+@@ -95,6 +96,8 @@
+ /*
+ * Scan /dev and find the device name.
+ * Side-effect: directory is changed to /dev
++ *
++ * FIXME: scan subdirectories for devfs support ?
+ */
+ int findtty(char *res, int rlen, dev_t dev)
+ {
+@@ -117,18 +120,88 @@
+ }
+ }
+ if (ent == NULL) {
+- fprintf(stderr, "bootlogd: cannot find console device\n");
++ fprintf(stderr, "bootlogd: cannot find console device "
++ "%d:%d in /dev\n", major(dev), minor(dev));
+ r = -1;
+- } else if (strlen(ent->d_name) >= rlen) {
++ } else if (strlen(ent->d_name) + 5 >= rlen) {
+ fprintf(stderr, "bootlogd: console device name too long\n");
+ r = -1;
+ } else
+- strcpy(res, ent->d_name);
++ snprintf(res, rlen, "/dev/%s", ent->d_name);
+ closedir(dir);
+
+ return r;
+ }
+
++/*
++ * For some reason, openpty() in glibc sometimes doesn't
++ * work at boot-time. It must be a bug with old-style pty
++ * names, as new-style (/dev/pts) is not available at that
++ * point. So, we find a pty/tty pair ourself if openpty()
++ * fails for whatever reason.
++ */
++int findpty(int *master, int *slave, char *name)
++{
++ char pty[16];
++ char tty[16];
++ int i, j;
++ int found;
++
++ if (openpty(master, slave, name, NULL, NULL) >= 0)
++ return 0;
++
++ found = 0;
++
++ for (i = 'p'; i <= 'z'; i++) {
++ for (j = '0'; j <= 'f'; j++) {
++ if (j == '9' + 1) j = 'a';
++ sprintf(pty, "/dev/pty%c%c", i, j);
++ sprintf(tty, "/dev/tty%c%c", i, j);
++ if ((*master = open(pty, O_RDWR|O_NOCTTY)) >= 0) {
++ *slave = open(tty, O_RDWR|O_NOCTTY);
++ if (*slave >= 0) {
++ found = 1;
++ break;
++ }
++ }
++ }
++ if (found) break;
++ }
++ if (found < 0) return -1;
++
++ if (name) strcpy(name, tty);
++
++ return 0;
++}
++/*
++ * See if a console taken from the kernel command line maps
++ * to a character device we know about, and if we can open it.
++ */
++int isconsole(char *s, char *res, int rlen)
++{
++ struct consdev *c;
++ int l, sl, i, fd;
++ char *p, *q;
++
++ sl = strlen(s);
++
++ for (c = consdev; c->cmdline; c++) {
++ l = strlen(c->cmdline);
++ if (sl <= l) continue;
++ p = s + l;
++ if (strncmp(s, c->cmdline, l) != 0 || !isdigit(*p))
++ continue;
++