[Pkg-sysvinit-commits] r893 - in sysvinit/trunk/debian: . sysv-rc/doc

Petter Reinholdtsen pere at costa.debian.org
Sat Sep 9 09:29:55 UTC 2006


Author: pere
Date: 2006-09-09 09:29:55 +0000 (Sat, 09 Sep 2006)
New Revision: 893

Added:
   sysvinit/trunk/debian/sysv-rc/doc/update-rc.d-recover
Modified:
   sysvinit/trunk/debian/NEWS
   sysvinit/trunk/debian/changelog
Log:
  * Add new NEWS entry with a better shell fragment for recovering
    from the update-rc.d problem.  Add script
    /usr/share/doc/sysv-rc/update-rc.d-recover to make it easier for
    people to recover.(Closes: #386649)

Modified: sysvinit/trunk/debian/NEWS
===================================================================
--- sysvinit/trunk/debian/NEWS	2006-09-09 08:11:06 UTC (rev 892)
+++ sysvinit/trunk/debian/NEWS	2006-09-09 09:29:55 UTC (rev 893)
@@ -16,8 +16,14 @@
   avoid this, add -y as an argument for apt-get.  An alternative to
   reinstalling all these packages is to look in /var/log/dpkg.log for
   the packages that was installed and upgraded between sysv-rc version
-  2.86.ds1-16 and version 2.86.ds1-18, and only reinstall these.
+  2.86.ds1-16 and version 2.86.ds1-18, and only reinstall these.  A
+  script to do the update is provided in
 
+    /usr/share/doc/sysv-rc/update-rc.d-recover
+
+  Please use it to update your installation if you were upgrading from
+  one of the broken versions of sysv-rc.
+
  -- Petter Reinholdtsen <pere at debian.org>  Thu,  8 Sep 2006 15:40:50 +0200
 
 sysvinit (2.86.ds1-18) unstable; urgency=low

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2006-09-09 08:11:06 UTC (rev 892)
+++ sysvinit/trunk/debian/changelog	2006-09-09 09:29:55 UTC (rev 893)
@@ -1,7 +1,9 @@
 sysvinit (2.86.ds1-19~1) unstable; urgency=low
 
-  * Add new NEWS entry with a better shell fragment for
-    recovering from the update-rc.d problem.
+  * Add new NEWS entry with a better shell fragment for recovering
+    from the update-rc.d problem.  Add script
+    /usr/share/doc/sysv-rc/update-rc.d-recover to make it easier for
+    people to recover.(Closes: #386649)
   * LSB header updates:
     - umountfs should execute before umountroot, not before halt or
       reboot.

Added: sysvinit/trunk/debian/sysv-rc/doc/update-rc.d-recover
===================================================================
--- sysvinit/trunk/debian/sysv-rc/doc/update-rc.d-recover	                        (rev 0)
+++ sysvinit/trunk/debian/sysv-rc/doc/update-rc.d-recover	2006-09-09 09:29:55 UTC (rev 893)
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# Author: Petter Reinholdtsen
+# Date:   2006-09-08
+#
+# This script was created to recover from a broken update-rc.d in
+# sysv-rc versions 2.86.ds1-16 and 2.86.ds1-17.
+
+# Set to true to bypass dpkg and run postinst directly.
+bypass=true
+
+if [ -f /var/log/dpkg.log ] ; then
+    packages="`sed -n "/installed sysvinit 2.86.ds1-16/,/installed sysvinit 2.86.ds1-18/p" /var/log/dpkg.log | awk '/ upgrade / { print $4 } / installed / { print $5 }' | sort -u`"
+else
+    packages="`dpkg -S /etc/init.d/*|cut -d: -f1|sort -u`"
+fi
+
+for p in $packages ; do
+    # Make sure it is installed
+    if dpkg --get-selections $p | grep -qw install ; then
+	# Only fix packages with init.d scripts
+	if dpkg -L $p | grep -q /etc/init.d/ ; then
+	    brokenpackages="$brokenpackages $p"
+	fi
+    fi
+done
+
+if [ true = $bypass ] ; then
+    for p in $brokenpackages ; do
+	echo "Running package $p postinst"
+	/var/lib/dpkg/info/$p.postinst configure
+    done
+else
+    echo
+    echo "**** Reinstalling these packages ****"
+    echo "  $brokenpackages"
+    echo
+    apt-get --reinstall -u install $brokenpackages
+fi    


Property changes on: sysvinit/trunk/debian/sysv-rc/doc/update-rc.d-recover
___________________________________________________________________
Name: svn:executable
   + *




More information about the Pkg-sysvinit-commits mailing list