[Pkg-sysvinit-commits] r1620 - sysvinit/trunk/debian
Petter Reinholdtsen
pere at alioth.debian.org
Sun Aug 23 17:30:25 UTC 2009
Author: pere
Date: 2009-08-23 17:30:24 +0000 (Sun, 23 Aug 2009)
New Revision: 1620
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/initscripts.postinst
Log:
Rewrite initscripts postinst to always use the update-rc.d script
instead of the legacy updatercd() function which was used as a
speed optimization no longer relevant when dependency based boot
sequencing is the default.
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2009-08-23 17:10:57 UTC (rev 1619)
+++ sysvinit/trunk/debian/changelog 2009-08-23 17:30:24 UTC (rev 1620)
@@ -26,6 +26,10 @@
postinst (Closes: #538934). The change make it possible to remove
both sysv-rc and insserv (Closes: #538959) if other packages want
to take over the boot sequencing resposibility.
+ * Rewrite initscripts postinst to always use the update-rc.d script
+ instead of the legacy updatercd() function which was used as a
+ speed optimization no longer relevant when dependency based boot
+ sequencing is the default.
[ Kel Modderman ]
* Migrate from dpatch to quilt for patch management:
Modified: sysvinit/trunk/debian/initscripts.postinst
===================================================================
--- sysvinit/trunk/debian/initscripts.postinst 2009-08-23 17:10:57 UTC (rev 1619)
+++ sysvinit/trunk/debian/initscripts.postinst 2009-08-23 17:30:24 UTC (rev 1620)
@@ -16,59 +16,6 @@
umask 022
-#
-# Function like update-rc.d but simpler & faster.
-# Usage: updatercd basename start|stop NN runlevel .
-#
-# Heuristic: use the real update-rc.d if file-rc or insserv is
-# detected, or if the /etc/rc2.d directory is not present.
-#
-updatercd() {
-
- [ -f /etc/init.d/$1 ] || return 0
-
- if \
- [ -d /usr/share/file-rc/. ] \
- || [ -d /usr/lib/file-rc/. ] \
- || [ -d /usr/share/insserv/. ] \
- || [ ! -d /etc/rc2.d/. ]
- then
- # Funniness on next line is because we are running with set -e
- update-rc.d "$@" >/dev/null && return 0 || return $?
- fi
-
- base=$1
- shift
-
- tmp="$(echo /etc/rc?.d/[SK]??$base)"
- case "$tmp" in
- "/etc/rc?.d/[SK]??$base") : ;;
- *) return ;;
- esac
-
- while [ "$1" != "" ]
- do
- if [ "$1" = stop ]
- then
- tlet=K
- else
- tlet=S
- fi
- case "$2" in
- ?) lev=0$2 ;;
- *) lev=$2 ;;
- esac
- shift 2
- while [ "$1" != "." ]
- do
- cd /etc/rc$1.d
- ln -sf ../init.d/$base $tlet$lev$base
- shift
- done
- shift
- done
-}
-
chrooted() {
if [ -r /proc/1/root ]; then
return 1
@@ -123,37 +70,37 @@
#
# Links in runlevel S
#
-updatercd mountkernfs.sh start 2 S .
-updatercd hostname.sh start 2 S .
-updatercd mountdevsubfs.sh start 4 S .
-updatercd bootlogd start 5 S .
-updatercd checkroot.sh start 10 S .
-updatercd mtab.sh start 12 S .
-updatercd checkfs.sh start 30 S .
-updatercd mountall.sh start 35 S .
-updatercd mountall-bootclean.sh start 36 S .
-updatercd mountoverflowtmp start 37 S .
-updatercd mountnfs.sh start 45 S .
-updatercd mountnfs-bootclean.sh start 46 S .
-updatercd bootmisc.sh start 55 S .
-updatercd urandom start 55 S . start 30 0 6 .
+update-rc.d mountkernfs.sh start 2 S .
+update-rc.d hostname.sh start 2 S .
+update-rc.d mountdevsubfs.sh start 4 S .
+update-rc.d bootlogd start 5 S .
+update-rc.d checkroot.sh start 10 S .
+update-rc.d mtab.sh start 12 S .
+update-rc.d checkfs.sh start 30 S .
+update-rc.d mountall.sh start 35 S .
+update-rc.d mountall-bootclean.sh start 36 S .
+update-rc.d mountoverflowtmp start 37 S .
+update-rc.d mountnfs.sh start 45 S .
+update-rc.d mountnfs-bootclean.sh start 46 S .
+update-rc.d bootmisc.sh start 55 S .
+update-rc.d urandom start 55 S . start 30 0 6 .
#
# Links in runlevels other than S
#
-updatercd halt start 90 0 .
-updatercd reboot start 90 6 .
-updatercd umountroot start 60 0 6 .
-updatercd umountfs start 40 0 6 .
-updatercd umountnfs.sh start 31 0 6 .
-updatercd sendsigs start 20 0 6 .
+update-rc.d halt start 90 0 .
+update-rc.d reboot start 90 6 .
+update-rc.d umountroot start 60 0 6 .
+update-rc.d umountfs start 40 0 6 .
+update-rc.d umountnfs.sh start 31 0 6 .
+update-rc.d sendsigs start 20 0 6 .
-updatercd killprocs start 30 1 .
-updatercd single start 90 1 .
-updatercd bootlogs start 70 1 2 3 4 5 .
-updatercd rc.local start 99 2 3 4 5 .
-updatercd rmnologin start 99 2 3 4 5 .
-updatercd stop-bootlogd-single start 99 S .
-updatercd stop-bootlogd start 99 2 3 4 5 .
+update-rc.d killprocs start 30 1 .
+update-rc.d single start 90 1 .
+update-rc.d bootlogs start 70 1 2 3 4 5 .
+update-rc.d rc.local start 99 2 3 4 5 .
+update-rc.d rmnologin start 99 2 3 4 5 .
+update-rc.d stop-bootlogd-single start 99 S .
+update-rc.d stop-bootlogd start 99 2 3 4 5 .
#
# Remove scripts that were left behind by older glibc (<< 2.3.2.ds1-12)
More information about the Pkg-sysvinit-commits
mailing list