[Initscripts-ng-commits] r393 - in /trunk/src/insserv/debian: changelog update-bootsystem-insserv

pere at users.alioth.debian.org pere at users.alioth.debian.org
Tue Jan 1 12:38:11 UTC 2008


Author: pere
Date: Tue Jan  1 12:38:11 2008
New Revision: 393

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=393
Log:
  * Refuse to convert to dependency based boot sequence when obsolete
    init.d scripts are found, as these tend to mess up the boot
    sequence.

Modified:
    trunk/src/insserv/debian/changelog
    trunk/src/insserv/debian/update-bootsystem-insserv

Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=393&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Tue Jan  1 12:38:11 2008
@@ -15,6 +15,9 @@
   * Extended check-initd-order to check optional start dependencies,
     and implement check of the shutdown sequence.
   * Extended to check reverse dependencies too.
+  * Refuse to convert to dependency based boot sequence when obsolete
+    init.d scripts are found, as these tend to mess up the boot
+    sequence.
 
  -- Petter Reinholdtsen <pere at debian.org>  Mon, 31 Dec 2007 19:26:00 +0100
 

Modified: trunk/src/insserv/debian/update-bootsystem-insserv
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/update-bootsystem-insserv?rev=393&op=diff
==============================================================================
--- trunk/src/insserv/debian/update-bootsystem-insserv (original)
+++ trunk/src/insserv/debian/update-bootsystem-insserv Tue Jan  1 12:38:11 2008
@@ -96,6 +96,19 @@
 	regenerate_sysv_sequence
     fi
 else
+    # Refuse to convert when there are obsolete init.d scripts left
+    # behind, as these tend to confuse the boot sequence.
+    for package in $(dpkg -S $(find /etc/init.d -type f -perm /+x) \
+                     2>/dev/null | cut -d: -f1 | sort -u); do
+        if dpkg-query -W -f='${Conffiles}' $package | \
+            grep /etc/init.d/ | grep -q obsolete; then
+            echo "error: obsolete init.d conffile left behind by package $package:"
+            dpkg-query -W -f='${Conffiles}' $package | \
+                grep /etc/init.d/ | grep obsolete | sed 's/^/  /'
+            badstate=1
+        fi
+    done
+
     insserv -nv > $logfile 2>&1
     if grep -q 'There is a loop between' $logfile ; then
 	echo "error: Problems running insserv:"
@@ -103,6 +116,10 @@
 	echo "info: Please check out this manually."
 	echo "info: Refusing to convert boot sequence until this is fixed"
 	rm $logfile
+	badstate=1
+    fi
+
+    if [ 1 = "$badstate" ] ; then
 	exit 1
     fi
 




More information about the Initscripts-ng-commits mailing list