[Pkg-sysvinit-commits] r1617 - sysvinit/trunk/debian
Petter Reinholdtsen
pere at alioth.debian.org
Thu Aug 20 12:37:48 UTC 2009
Author: pere
Date: 2009-08-20 12:37:48 +0000 (Thu, 20 Aug 2009)
New Revision: 1617
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/sysv-rc.postinst
Log:
Extend boot order migration check to reject migration if init.d
scripts from removed but not purged packages are present.
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2009-08-20 12:37:02 UTC (rev 1616)
+++ sysvinit/trunk/debian/changelog 2009-08-20 12:37:48 UTC (rev 1617)
@@ -57,7 +57,10 @@
* Drop unneeded dependency on udev for init.d/bootlogs, and add ldm
and sdm to list of display managers to start after to get the
complete list.
+ * Extend boot order migration check to reject migration if init.d
+ scripts from removed but not purged packages are present.
+
-- Kel Modderman <kel at otaku42.de> Sun, 02 Aug 2009 05:46:21 +1000
sysvinit (2.87dsf-2) unstable; urgency=low
Modified: sysvinit/trunk/debian/sysv-rc.postinst
===================================================================
--- sysvinit/trunk/debian/sysv-rc.postinst 2009-08-20 12:37:02 UTC (rev 1616)
+++ sysvinit/trunk/debian/sysv-rc.postinst 2009-08-20 12:37:48 UTC (rev 1617)
@@ -51,7 +51,6 @@
# Refuse to convert when there are obsolete init.d scripts left
# behind, as these tend to confuse the boot sequence.
echo "info: Checking if it is safe to convert to dependency based boot."
- retval=1
for package in $(dpkg -S $(find /etc/init.d -type f -perm /+x) \
2>/dev/null | cut -d: -f1 | sort -u); do
obsolete_initscripts=$(dpkg-query -W -f='${Conffiles}\n' $package | \
@@ -60,20 +59,29 @@
for initscript in $obsolete_initscripts; do
if [ -e "$initscript" ]; then
echo "error: Obsolete conffile $initscript left behind by package $package"
- retval=0
+ return 0
fi
done
fi
done
+ # Refuse to migrate if there are removed but not purged packages
+ # with init.d scripts, as their dependency information is probably
+ # outdated or missing, leading to incorrect ordering.
+ for package in $(dpkg -l $(dpkg -S /etc/init.d/* 2>/dev/null |
+ cut -d: -f1)|grep ^rc|awk '{print $2}') ; do
+ echo "error: Removed but not purged package $package with init.d script"
+ return 0
+ done
+
insserv -nv > $logfile 2>&1 || true
if egrep -q 'There is a loop between|already provided!|provides system facility' $logfile ; then
echo "error: Problems running insserv:"
egrep 'There is a loop between|loop involving service|already provided!|provides system facility' $logfile | sed 's/^/ /'
rm $logfile
- retval=0
+ return 0
fi
- return $retval
+ return 1
}
activate_insserv() {
More information about the Pkg-sysvinit-commits
mailing list