[Pkg-sysvinit-devel] Please allow sysvinit version 2.86.ds1-61 into testing
Petter Reinholdtsen
pere at hungry.com
Tue Aug 12 20:30:03 UTC 2008
After realizing that it would be possible to get splash screens
working properly in Lenny with gdm and kdm, and to get it working with
runlevel 1 as well, by extending sysv-rc to not only track when the
splash system should be stopped, but to also stop it, I concluded it
would be a good idea to get yet another update of sysvinit into Lenny.
It should get usplash working, and if splashy implement the progress
bar API used by initscripts and sysv-rc, splashy should work as well.
While working on a new sysvinit upload, I checked the BTS for a few
easy fixes and stuff related to release goals, and decided to include
some more fixes in the upload. This is the complete diff. Please
allow it to propagate into Lenny when it has had some time in
unstable. As can be seen in the changelog, I fixed an SELinux related
issue and got rid of a warningfrom invoke-rc.d when called during the
early boot.
diff -u sysvinit-2.86.ds1/debian/changelog sysvinit-2.86.ds1/debian/changelog
--- sysvinit-2.86.ds1/debian/changelog
+++ sysvinit-2.86.ds1/debian/changelog
@@ -1,3 +1,25 @@
+sysvinit (2.86.ds1-61) unstable; urgency=low
+
+ * Fix typo in rcS(5), proberly->properly (Closes: #484233). Thanks to
+ Julien Danjou for noticing.
+ * Fix typo in rcS(5), maually->manually (Closes: #493680). Thanks to
+ Xr for noticing.
+ * Modify runlevel detection code in invoke-rc.d to notice the
+ difference between runlevels 0 and 6, and the boot runlevel, to
+ make it possible to use invoke-rc.d during boot (Closes: 384509).
+ * Make sure to call restorecon after mounting tmpfs file systems, to
+ set SELinux permissions (Closes: #493679). Patch from Russell
+ Coker.
+ * Move responsibility of stopping the splash screen process from
+ individual init.d scripts to init.d/rc. This make sure the
+ progress calculation reflect reality, and that the splash screen
+ is taken down in runlevel 1 (Closes: #431560) and that it stop
+ before gdm and kdm (Closes: #422922, #489734).
+ * Skip error message from checkfs.sh when / is read-only. Patch
+ from Mirek Slugen (Closes: #492214).
+
+ -- Petter Reinholdtsen <pere at debian.org> Tue, 12 Aug 2008 16:07:50 +0200
+
sysvinit (2.86.ds1-60) unstable; urgency=low
* Make bootmisc.sh depend on $remote_fs instead of $local_fs, to
diff -u sysvinit-2.86.ds1/debian/sysv-rc/etc/init.d/rc sysvinit-2.86.ds1/debian/sysv-rc/etc/init.d/rc
--- sysvinit-2.86.ds1/debian/sysv-rc/etc/init.d/rc
+++ sysvinit-2.86.ds1/debian/sysv-rc/etc/init.d/rc
@@ -53,6 +53,7 @@
else
# Quiet down script if old initscripts version without /lib/init/splash-functions-base is used.
splash_progress() { return 1; }
+ splash_stop() { return 1; }
fi
# Now find out what the current and what the previous runlevel are.
@@ -226,6 +227,19 @@
;;
esac
+# Check if the splash screen should be stopped before the given
+# script.
+is_splash_stop_scripts() {
+ scriptname=$1
+ case "$scriptname" in
+ # killprocs is used in runlevel 1
+ gdm|xdm|kdm|ltsp-client|ltsp-client-core|reboot|halt|killprocs)
+ return 0
+ ;;
+ esac
+ return 1
+}
+
# Is there an rc directory for this new runlevel?
if [ -d /etc/rc$runlevel.d ]
then
@@ -267,11 +281,9 @@
# (for progress bars)
num_steps=0
for s in /etc/rc$runlevel.d/[SK]*; do
- case "${s##/etc/rc$runlevel.d/S??}" in
- gdm|xdm|kdm|ltsp-client|ltsp-client-core|reboot|halt)
+ if is_splash_stop_scripts "${s##/etc/rc$runlevel.d/S??}" ; then
break
- ;;
- esac
+ fi
num_steps=$(($num_steps + 1))
done
step=0
@@ -313,6 +325,9 @@
# Stop the service.
SCRIPTS="$SCRIPTS $i"
+ if is_splash_stop_scripts "$suffix" ; then
+ splash_stop || true
+ fi
done
startup stop $SCRIPTS
done
@@ -336,13 +351,13 @@
do
[ ! -f $i ] && continue
+ suffix=${i#/etc/rc$runlevel.d/S[0-9][0-9]}
if [ "$previous" != N ]
then
#
# Find start script in previous runlevel and
# stop script in this runlevel.
#
- suffix=${i#/etc/rc$runlevel.d/S[0-9][0-9]}
stop=/etc/rc$runlevel.d/K[0-9][0-9]$suffix
previous_start=/etc/rc$previous.d/S[0-9][0-9]$suffix
#
@@ -366,6 +381,9 @@
fi
SCRIPTS="$SCRIPTS $i"
+ if is_splash_stop_scripts "$suffix" ; then
+ splash_stop || true
+ fi
done
startup $ACTION $SCRIPTS
done
diff -u sysvinit-2.86.ds1/debian/sysv-rc/sbin/invoke-rc.d sysvinit-2.86.ds1/debian/sysv-rc/sbin/invoke-rc.d
--- sysvinit-2.86.ds1/debian/sysv-rc/sbin/invoke-rc.d
+++ sysvinit-2.86.ds1/debian/sysv-rc/sbin/invoke-rc.d
@@ -280,6 +280,15 @@
RL=
fi
+## Running ${RUNLEVEL} to get current runlevel do not work in the boot
+## runlevel (scripts in /etc/rcS.d/), as /var/run/utmp contain
+## runlevel 0 or 6 (written at shutdown) at that point.
+if test x${RL} = x0 || test x${RL} = x6 ; then
+ if ps -fp 1 | grep -q 'init boot' ; then
+ RL=S
+ fi
+fi
+
## Handles shutdown sequences VERY safely
## i.e.: forget about policy, and do all we can to run the script.
## BTW, why the heck are we being run in a shutdown runlevel?!
diff -u sysvinit-2.86.ds1/debian/initscripts/rcS.5 sysvinit-2.86.ds1/debian/initscripts/rcS.5
--- sysvinit-2.86.ds1/debian/initscripts/rcS.5
+++ sysvinit-2.86.ds1/debian/initscripts/rcS.5
@@ -88,7 +88,7 @@
If there are major inconsistencies
then the fsck process will bail out.
The system will print a message
-asking the administrator to repair the file system maually
+asking the administrator to repair the file system manually
and will present a root shell prompt
(actually a \fIsulogin\fP prompt)
on the console.
@@ -114,7 +114,7 @@
when the network interfaces are mounted, and instead do it only once when
the machine boot. The default is 'yes'. It is useful to disable this
on machines with the root file system in NFS until ifup from ifupdown work
-proberly in such setup.
+properly in such setup.
.SH NOTE
The \fBEDITMOTD\fP variable is no longer used.
diff -u sysvinit-2.86.ds1/debian/initscripts/lib/init/mount-functions.sh sysvinit-2.86.ds1/debian/initscripts/lib/init/mount-functions.sh
--- sysvinit-2.86.ds1/debian/initscripts/lib/init/mount-functions.sh
+++ sysvinit-2.86.ds1/debian/initscripts/lib/init/mount-functions.sh
@@ -114,6 +114,9 @@
is_empty_dir "$MTPT" >/dev/null 2>&1 || log_warning_msg "Files under mount point '$MTPT' will be hidden."
fi
mount -n -t $FSTYPE $5 $OPTS $DEVNAME $MTPT
+ if [ "$FSTYPE" = "tmpfs" -a -x /sbin/restorecon ]; then
+ /sbin/restorecon $MTPT
+ fi
}
#
diff -u sysvinit-2.86.ds1/debian/initscripts/etc/init.d/checkfs.sh sysvinit-2.86.ds1/debian/initscripts/etc/init.d/checkfs.sh
--- sysvinit-2.86.ds1/debian/initscripts/etc/init.d/checkfs.sh
+++ sysvinit-2.86.ds1/debian/initscripts/etc/init.d/checkfs.sh
@@ -105,7 +105,7 @@
fi
splash_stop_indefinite
fi
- rm -f /fastboot /forcefsck
+ rm -f /fastboot /forcefsck 2>/dev/null
}
case "$1" in
Happy hacking,
--
Petter Reinholdtsen
More information about the Pkg-sysvinit-devel
mailing list