On Wed, Aug 10, 2005 at 06:37:30PM +0200, Miquel van Smoorenburg wrote:
> Actually, perhaps sysvinit should be a project on alioth with more than
> one developer doing the work. Sysvinit and related packages are more
> than just packaging.

Sure, but, in the meantime, are you open to me uploading the attached
NMU? It's just a cleanup of many of the bugs in the BTS which do not
introduce fundamental changes to the initscripts. The only behaviour
changes are introduced in #289562 and #85221. The rest bugfixes are
either needed changes to the code (#284426) or documentation improvements.

Are you OK with this NMU? If so, I will submit it to the DELAYED queue
(just in case you regret saying 'go ahead').

Notice also that Ubuntu has made some patches that might be interesting
to forward port to sysvinit (maybe most of them - LSB 3.0 stuff)

Regards

Javier
diff -Nru sysvinit-2.86.ds1/debian/changelog 
sysvinit-2.86.ds1.new/debian/changelog
--- sysvinit-2.86.ds1/debian/changelog  2005-08-11 02:36:18.000000000 +0200
+++ sysvinit-2.86.ds1.new/debian/changelog      2005-08-11 02:36:03.000000000 
+0200
@@ -1,3 +1,40 @@
+sysvinit (2.86.ds1-1.1) unstable; urgency=low
+
+  * Non-maintainer upload (bug cleanup)
+  * Fix stupid find warning by ordering the arguments correctly in
+    /etc/init.d/bootclean.sh (closes: #284426, #316431)
+  * Have cleantmp() in bootclean set TMPTIME to 0 if undefined to prevent
+    from breaking if the variable is not defined properly. (Closes: #314351)
+  * Introduce a better warning message in checkroot.sh when it fails
+    to fsck the root filesystem (Closes: #272916)
+  * Added a comment in /etc/init.d/skeleton regarding the use of 'sleep 1'
+    and describing possible changes maintainers might need to introduce
+    (Closes: #277204)
+  * Remove .clean files if not owned by root in bootclean.sh to prevent users
+    from tricking us to _not_ clean up some directories (Closes: #289562)
+  * Do not remove nologin twice (i.e. in checkroot.sh and in rmnologin)
+    (Closes: #317704)
+  * Check if there is a portmapper running before starting it up in 
+    mountnfs.sh, also, use the portmap init.d script instead of running it
+    through start-stop-daemon if it is available (Closes: #85221)
+  * Do not install manpages with the execute permission bit (Closes: #281782)
+  * Clarify semantics of TMPFS_SIZE in /etc/default/tmpfs (Closes: #317385)
+  * Add feedback to user based on start-stop-daemon exit code
+    in the skeleton init script (Closes: #296489)
+  * Document the fact that shutdown touches /etc/nologin only 5 minutes
+    before shutting down the system (Closes: #204857)
+  * Add '-f' option to last manpage (Closes: #247102)
+  * Fix man page and help screen of update-rc.d (Closes: #268713, #288098)
+  * Changed 'editted' to 'regenerated' in /etc/default/rcS (Closes: #269894)
+  * Fix formatting issue in mesg(1) (Closes: #272588)
+  * Fix typo in bootlogd(8) manpage (Closes: #300645)
+  * Document exit status of pidof(1) (Closes: #311741)
+  * Point to proper chapter in init.d/README (Closes: #318453)
+  * Describe the proper behaviour in rcS's README (Closes: #318857)
+  * Added watch file provided by Stefano Fabri (Closes: #248739)
+
+ -- Javier Fernandez-Sanguino Pen~a <[EMAIL PROTECTED]>  Wed, 10 Aug 2005 
18:58:47 +0200
+
 sysvinit (2.86.ds1-1) unstable; urgency=low
 
   * New upload with a clean .orig.tar.gz archive without the .o files.
diff -Nru sysvinit-2.86.ds1/debian/initscripts/etc/default/tmpfs 
sysvinit-2.86.ds1.new/debian/initscripts/etc/default/tmpfs
--- sysvinit-2.86.ds1/debian/initscripts/etc/default/tmpfs      2005-08-11 
02:36:18.000000000 +0200
+++ sysvinit-2.86.ds1.new/debian/initscripts/etc/default/tmpfs  2005-08-11 
01:39:34.000000000 +0200
@@ -1,3 +1,5 @@
-# TMPFS_SIZE sets the max size that /dev/shm can use.  By default, the
-# kernel sets this upper limit to half of available memory.
+# TMPFS_SIZE sets the max size (in bytes) that /dev/shm can use.  By default,
+# the kernel sets this upper limit to half of available memory.
+# Note that the size will be rounded down to a multiple of the page size (4096
+# bytes).
 TMPFS_SIZE=
diff -Nru sysvinit-2.86.ds1/debian/initscripts/etc/init.d/bootclean.sh 
sysvinit-2.86.ds1.new/debian/initscripts/etc/init.d/bootclean.sh
--- sysvinit-2.86.ds1/debian/initscripts/etc/init.d/bootclean.sh        
2005-08-11 02:36:18.000000000 +0200
+++ sysvinit-2.86.ds1.new/debian/initscripts/etc/init.d/bootclean.sh    
2005-08-11 01:25:04.000000000 +0200
@@ -7,6 +7,7 @@
 cleantmp() {
 
        [ -f /tmp/.clean ] && return
+       [ -z "$TMPTIME" ] && TMPTIME = 0
 
        # Don't clean /tmp if TMPTIME < 0 or "infinite".
        case "$TMPTIME" in
@@ -25,7 +26,7 @@
        #       at all, so we can also delete files with timestamps
        #       in the future!
        #
-       if [ "$TMPTIME" = 0 ]
+       if [ "$TMPTIME" = 0 ] 
        then
                TEXPR=""
                DEXPR=""
@@ -53,14 +54,14 @@
                ! ( -path ./.clean -uid 0 )
                ! ( -path './...security*' -uid 0 )'
 
-       ( if cd /tmp && [ "`find . -perm -002 -maxdepth 0`" = "." ]
+       ( if cd /tmp && [ "`find . -maxdepth 0 -perm -002`" = "." ]
          then
                # First remove all old files.
-               find . -xdev $TEXPR $EXCEPT \
-                               ! -type d -depth -print0 | xargs -0r rm -f
+               find . -depth -xdev $TEXPR $EXCEPT \
+                               ! -type d -print0 | xargs -0r rm -f
                # And then all empty directories.
-               find . -xdev $DEXPR $EXCEPT \
-                               -type d -depth -empty -exec rmdir \{\} \;
+               find . -depth -xdev $DEXPR $EXCEPT \
+                               -type d -empty -exec rmdir \{\} \;
                rm -f .X*-lock
          fi
        )
@@ -110,6 +111,18 @@
                return 0
        fi
 
+        # If there are /tmp/.clean files which have not been created
+        # by root remove them
+        for cleandir in /tmp /var/run /var/lock; do
+               if [ -f $cleandir/.clean ] ; then
+                       [ -x /usr/bin/stat ] && cleanuid=`/usr/bin/stat -c %u 
$cleandir/.clean`
+                       # Poor's man stat %u, since stat (and /usr) might not be
+                       # available in some bootup stages
+                       [ -z "$cleanuid" ] && cleanuid=`/bin/find 
$cleandir/.clean -printf %U`
+                       [ "$cleanuid" -ne 0 ] && rm -f $cleandir/.clean
+               fi
+        done
+
        if [ -f /tmp/.clean ] && [ -f /var/run/.clean ] &&
           [ -f /var/lock/.clean ]
        then
diff -Nru sysvinit-2.86.ds1/debian/initscripts/etc/init.d/checkroot.sh 
sysvinit-2.86.ds1.new/debian/initscripts/etc/init.d/checkroot.sh
--- sysvinit-2.86.ds1/debian/initscripts/etc/init.d/checkroot.sh        
2005-08-11 02:36:18.000000000 +0200
+++ sysvinit-2.86.ds1.new/debian/initscripts/etc/init.d/checkroot.sh    
2005-08-11 01:27:19.000000000 +0200
@@ -254,15 +254,20 @@
 then
        # Surprise! Re-directing from a HERE document (as in
        # "cat << EOF") won't work, because the root is read-only.
+       echo 
+       echo "An automatic fsck upon the root filesystem failed."
+       echo "A manual fsck must be performed, and the system rebooted. "
+       echo "This fsck can be performed in maintenance mode."
+       echo 
+       echo "Please note, the root filesystem is currently mounted read-only."
+       echo "The fsck should only be performed while the root filesystem is "
+       echo "mounted read-only. However, the command to remount it read-write "
+       echo "is:"
        echo
-       echo "fsck failed.  Please repair manually and reboot.  Please note"
-       echo "that the root file system is currently mounted read-only.  To"
-       echo "remount it read-write:"
-       echo
-       echo "   # mount -n -o remount,rw /"
-       echo
-       echo "CONTROL-D will exit from this shell and REBOOT the system."
+       echo "  # mount -n -o remount,rw /"
        echo
+       echo "In order to exit from the maintenance shell, press CONTROL-D"
+       echo "and the system will REBOOT."
        # Start a single user shell on the console
        /sbin/sulogin $CONSOLE
        reboot -f
@@ -326,10 +331,8 @@
 fi
 
 #
-#      Remove /etc/nologin, and /dev/shm/root if we created it.
+#      Remove /dev/shm/root if we created it.
 #
-NOLOGIN="`readlink -f /etc/nologin || :`"
-rm -f "$NOLOGIN"
 rm -f /dev/shm/root
 
 : exit 0
diff -Nru sysvinit-2.86.ds1/debian/initscripts/etc/init.d/mountnfs.sh 
sysvinit-2.86.ds1.new/debian/initscripts/etc/init.d/mountnfs.sh
--- sysvinit-2.86.ds1/debian/initscripts/etc/init.d/mountnfs.sh 2005-08-11 
02:36:18.000000000 +0200
+++ sysvinit-2.86.ds1.new/debian/initscripts/etc/init.d/mountnfs.sh     
2005-08-11 01:34:07.000000000 +0200
@@ -72,11 +72,16 @@
 
 if [ "$portmap" = yes ]
 then
-       if [ -x /sbin/portmap ]
+       if [ -x /sbin/portmap ] && [ -z "`pidof portmap`" ] 
        then
                echo -n "Starting portmapper..."
-               start-stop-daemon --start --quiet --exec /sbin/portmap
-               sleep 2
+               if [ -x /etc/init.d/portmap ] 
+               then
+                       /etc/init.d/portmap start
+               else
+                       start-stop-daemon --start --quiet --exec /sbin/portmap
+                       sleep 2
+               fi
        fi
 fi
 
diff -Nru sysvinit-2.86.ds1/debian/initscripts/etc/init.d/skeleton 
sysvinit-2.86.ds1.new/debian/initscripts/etc/init.d/skeleton
--- sysvinit-2.86.ds1/debian/initscripts/etc/init.d/skeleton    2005-08-11 
02:36:18.000000000 +0200
+++ sysvinit-2.86.ds1.new/debian/initscripts/etc/init.d/skeleton        
2005-08-11 01:51:07.000000000 +0200
@@ -36,7 +36,8 @@
 #
 d_start() {
        start-stop-daemon --start --quiet --pidfile $PIDFILE \
-               --exec $DAEMON
+               --exec $DAEMON \
+               || echo -n " already running"
 }
 
 #
@@ -44,7 +45,8 @@
 #
 d_stop() {
        start-stop-daemon --stop --quiet --pidfile $PIDFILE \
-               --name $NAME
+               --name $NAME \
+               || echo -n " not running"
 }
 
 #
@@ -87,6 +89,11 @@
        #
        echo -n "Restarting $DESC: $NAME"
        d_stop
+       # One second might not be time enough for a daemon to stop, 
+       # if this happens, d_start will fail (and dpkg will break if 
+       # the package is being upgraded). Change the timeout if needed
+       # be, or change d_stop to have start-stop-daemon use --retry. 
+       # Notice that using --retry slows down the shutdown process somewhat.
        sleep 1
        d_start
        echo "."
diff -Nru sysvinit-2.86.ds1/debian/initscripts/share/default.rcS 
sysvinit-2.86.ds1.new/debian/initscripts/share/default.rcS
--- sysvinit-2.86.ds1/debian/initscripts/share/default.rcS      2005-08-11 
02:36:18.000000000 +0200
+++ sysvinit-2.86.ds1.new/debian/initscripts/share/default.rcS  2005-08-11 
02:13:54.000000000 +0200
@@ -13,7 +13,8 @@
 UTC=yes
 # Set VERBOSE to "no" if you would like a more quiet bootup.
 VERBOSE=yes
-# Set EDITMOTD to "no" if you don't want /etc/motd to be editted automatically
+# Set EDITMOTD to "no" if you don't want /etc/motd to be regenerated
+# automatically
 EDITMOTD=yes
 # Set FSCKFIX to "yes" if you want to add "-y" to the fsck at startup.
 FSCKFIX=no
diff -Nru sysvinit-2.86.ds1/debian/rules sysvinit-2.86.ds1.new/debian/rules
--- sysvinit-2.86.ds1/debian/rules      2005-08-11 02:36:18.000000000 +0200
+++ sysvinit-2.86.ds1.new/debian/rules  2005-08-11 01:36:42.000000000 +0200
@@ -120,12 +120,12 @@
        install -d -g root -m 755 -o root $(tmp)/var/lib/urandom
        install -g root -m 755 debian/initscripts/sbin/fsck.nfs \
                $(tmp)/sbin/fsck.nfs
-       install -g root -m 755 debian/initscripts/man/fsck.nfs.8 \
+       install -g root -m 644 debian/initscripts/man/fsck.nfs.8 \
                $(tmp)/usr/share/man/man8/fsck.nfs.8
        install -g root -m 644 debian/initscripts/rcS.5 \
                $(tmp)/usr/share/man/man5
        install -g root -m 755 src/mountpoint $(tmp)/bin
-       install -g root -m 755 man/mountpoint.1 $(tmp)/usr/share/man/man1
+       install -g root -m 644 man/mountpoint.1 $(tmp)/usr/share/man/man1
        install -g root -m 755 debian/readlink $(tmp)/lib/init
        gzip -9f $(tmp)/usr/share/man/man*/*.[0-9]
        install -g root -m 644 -o root debian/initscripts/copyright \
diff -Nru sysvinit-2.86.ds1/debian/sysvinit-watch 
sysvinit-2.86.ds1.new/debian/sysvinit-watch
--- sysvinit-2.86.ds1/debian/sysvinit-watch     1970-01-01 01:00:00.000000000 
+0100
+++ sysvinit-2.86.ds1.new/debian/sysvinit-watch 2005-08-11 02:32:35.000000000 
+0200
@@ -0,0 +1,2 @@
+version=2
+ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/sysvinit-([\d\.\d]+)\.tar\.gz
diff -Nru sysvinit-2.86.ds1/debian/sysv-rc/etc/init.d/README 
sysvinit-2.86.ds1.new/debian/sysv-rc/etc/init.d/README
--- sysvinit-2.86.ds1/debian/sysv-rc/etc/init.d/README  2005-08-11 
02:36:18.000000000 +0200
+++ sysvinit-2.86.ds1.new/debian/sysv-rc/etc/init.d/README      2005-08-11 
02:22:56.000000000 +0200
@@ -5,10 +5,11 @@
 in this directory work, and how the links in the /etc/rc?.d/ directories
 influence system startup/shutdown.
 
-For Debian, this information is contained in the policy manual, chapter 9.3:
-system run levels.  The home site for the Debian Policy Manual is at
+For Debian, this information is contained in the policy manual, chapter 
+"System run levels and init.d scripts".  The Debian Policy Manual is 
+available at:
 
-http://www.debian.org/doc/debian-policy/
+http://www.debian.org/doc/debian-policy/#contents
 
 The Debian Policy Manual is also available in the Debian package
 `debian-policy'.  When this package is installed, the policy manual can be
diff -Nru sysvinit-2.86.ds1/debian/sysv-rc/etc/rcS.d/README 
sysvinit-2.86.ds1.new/debian/sysv-rc/etc/rcS.d/README
--- sysvinit-2.86.ds1/debian/sysv-rc/etc/rcS.d/README   2005-08-11 
02:36:18.000000000 +0200
+++ sysvinit-2.86.ds1.new/debian/sysv-rc/etc/rcS.d/README       2005-08-11 
02:24:04.000000000 +0200
@@ -1,8 +1,9 @@
 
-The scripts in this directory are executed once when booting the system,
-even when booting directly into single user mode. The files are all symbolic
-links, the real files are located in /etc/init.d/ . For a more general
-discussion of this technique, see /etc/init.d/README.
+The scripts in this directory whose names begin with an 'S' are
+executed once when booting the system, even when booting directly
+into single user mode. The scripts are all symbolic links, the real
+files being located in /etc/init.d/ . For a more general discussion of
+this technique, see /etc/init.d/README.
 
 The following sequence points are defined at this time:
 
diff -Nru sysvinit-2.86.ds1/debian/sysv-rc/man8/update-rc.d.8 
sysvinit-2.86.ds1.new/debian/sysv-rc/man8/update-rc.d.8
--- sysvinit-2.86.ds1/debian/sysv-rc/man8/update-rc.d.8 2005-08-11 
02:36:18.000000000 +0200
+++ sysvinit-2.86.ds1.new/debian/sysv-rc/man8/update-rc.d.8     2005-08-11 
02:11:57.000000000 +0200
@@ -12,7 +12,7 @@
 .B update-rc.d
 .RI [ -n ]
 .IB name " defaults"
-.RI [ NN " | " NN-start " " NN-stop ]
+.RI [ NN " | " SS " " KK ]
 .HP
 .B update-rc.d
 .RI [ -n ]
@@ -74,8 +74,12 @@
 and stop the service in runlevels
 .BR 016 .
 By default all the links will have sequence code 20, but
-this can be overridden by supplying one or two
+this can be overridden by supplying one 
 .I NN
+or two
+.I SS
+and
+.I KK
 arguments; one argument overrides the sequence code for both start and
 stop links whereas of two arguments the first overrides the code for
 start links and the second that for stop links.
diff -Nru sysvinit-2.86.ds1/debian/sysv-rc/sbin/update-rc.d 
sysvinit-2.86.ds1.new/debian/sysv-rc/sbin/update-rc.d
--- sysvinit-2.86.ds1/debian/sysv-rc/sbin/update-rc.d   2005-08-11 
02:36:18.000000000 +0200
+++ sysvinit-2.86.ds1.new/debian/sysv-rc/sbin/update-rc.d       2005-08-11 
02:11:57.000000000 +0200
@@ -15,7 +15,7 @@
        print STDERR "update-rc.d: error: @_\n" if ($#_ >= 0);
        print STDERR <<EOF;
 usage: update-rc.d [-n] [-f] <basename> remove
-       update-rc.d [-n] <basename> defaults [NN | sNN kNN]
+       update-rc.d [-n] <basename> defaults [NN | SS KK]
        update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
                -n: not really
                -f: force
diff -Nru sysvinit-2.86.ds1/man/bootlogd.8 sysvinit-2.86.ds1.new/man/bootlogd.8
--- sysvinit-2.86.ds1/man/bootlogd.8    2004-06-09 14:47:45.000000000 +0200
+++ sysvinit-2.86.ds1.new/man/bootlogd.8        2005-08-11 02:19:19.000000000 
+0200
@@ -20,9 +20,9 @@
 \fIlogfile~\fP unless \fIlogfile~\fP already exists.
 .IP \fB\-v\fP
 Show version.
-.IP \fB\-l logfile\fP
+.IP "\fB\-l logfile\fP"
 Log to this logfile. The default is \fI/var/log/boot\fP.
-.IP \fB\-p pidfile\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
diff -Nru sysvinit-2.86.ds1/man/last.1 sysvinit-2.86.ds1.new/man/last.1
--- sysvinit-2.86.ds1/man/last.1        2004-07-30 13:39:18.000000000 +0200
+++ sysvinit-2.86.ds1.new/man/last.1    2005-08-11 02:09:58.000000000 +0200
@@ -51,6 +51,8 @@
 .\"}}}
 .\"{{{  Options
 .SH OPTIONS
+.IP \fB\-\fP\fIf \fIfile\fP
+Tells \fBlast\fP to use a specific file instead of \fB/var/log/wtmp\fP.
 .IP \fB\-\fP\fInum\fP
 This is a count telling \fBlast\fP how many lines to show.
 .IP "\fB\-n\fP \fInum\fP"
diff -Nru sysvinit-2.86.ds1/man/mesg.1 sysvinit-2.86.ds1.new/man/mesg.1
--- sysvinit-2.86.ds1/man/mesg.1        2004-06-09 14:47:45.000000000 +0200
+++ sysvinit-2.86.ds1.new/man/mesg.1    2005-08-11 02:14:59.000000000 +0200
@@ -26,7 +26,9 @@
 .PP
 If no option is given, \fBmesg\fP prints out the current access state of your
 terminal.
-.PP NOTES
+.\"}}}
+.\"{{{  Notes
+.SH NOTES
 \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.
diff -Nru sysvinit-2.86.ds1/man/pidof.8 sysvinit-2.86.ds1.new/man/pidof.8
--- sysvinit-2.86.ds1/man/pidof.8       1998-09-02 14:49:33.000000000 +0200
+++ sysvinit-2.86.ds1.new/man/pidof.8   2005-08-11 02:20:26.000000000 +0200
@@ -31,6 +31,13 @@
 Tells \fIpidof\fP to omit processes with that process id. The special
 pid \fB%PPID\fP can be used to name the parent process of the \fIpidof\fP
 program, in other words the calling shell or shell script.
+.SH "EXIT STATUS"
+.TP
+.B 0
+At least one program was found with the requested name.
+.TP
+.B 1
+No program was found with the requested name.
 .SH NOTES
 \fIpidof\fP is simply a (symbolic) link to the \fIkillall5\fP program,
 which should also be located in \fP/sbin\fP.
diff -Nru sysvinit-2.86.ds1/man/shutdown.8 sysvinit-2.86.ds1.new/man/shutdown.8
--- sysvinit-2.86.ds1/man/shutdown.8    2004-06-09 14:47:45.000000000 +0200
+++ sysvinit-2.86.ds1.new/man/shutdown.8        2005-08-11 02:06:15.000000000 
+0200
@@ -100,10 +100,11 @@
 Second, it can be in the format \fB+\fP\fIm\fP, in which \fIm\fP is the
 number of minutes to wait.  The word \fBnow\fP is an alias for \fB+0\fP.
 .PP
-If shutdown is called with a delay, it creates the advisory file
+If shutdown is called with a delay, it will create the advisory file
 .I /etc/nologin
 which causes programs such as \fIlogin(1)\fP to not allow new user
-logins. Shutdown removes this file if it is stopped before it
+logins. This file is created five minutes before the shutdown sequence
+starts. Shutdown removes this file if it is stopped before it
 can signal init (i.e. it is cancelled or something goes wrong).
 It also removes it before calling init to change the runlevel.
 .PP

Attachment: signature.asc
Description: Digital signature

Reply via email to