[Pkg-sysvinit-commits] r1652 - sysvinit/trunk/debian

Petter Reinholdtsen pere at alioth.debian.org
Thu Aug 27 15:13:32 UTC 2009


Author: pere
Date: 2009-08-27 15:13:32 +0000 (Thu, 27 Aug 2009)
New Revision: 1652

Modified:
   sysvinit/trunk/debian/sysv-rc.postinst
   sysvinit/trunk/debian/sysv-rc.templates
Log:
Report failure to migrate using debconf too.

Modified: sysvinit/trunk/debian/sysv-rc.postinst
===================================================================
--- sysvinit/trunk/debian/sysv-rc.postinst	2009-08-26 22:02:03 UTC (rev 1651)
+++ sysvinit/trunk/debian/sysv-rc.postinst	2009-08-27 15:13:32 UTC (rev 1652)
@@ -72,10 +72,14 @@
 	return 0
     done
 
+    # Refuse to migrate if insserv find problems, like loops,
+    # duplicate provides, script providing system facility or missing
+    # header completely.
     insserv -nv > $logfile 2>&1 || true
-    if egrep -q 'There is a loop between|already provided!|provides system facility' $logfile ; then
+    errstr='There is a loop between|loop involving service|already provided!|provides system facility|missing LSB tags'
+    if egrep -q "$errstr" $logfile ; then
 	echo "error: Problems running insserv:"
-	egrep 'There is a loop between|loop involving service|already provided!|provides system facility' $logfile | sed 's/^/  /'
+	egrep "$errstr" $logfile | sed 's/^/  /'
 	rm $logfile
 	return 0
     fi
@@ -109,15 +113,8 @@
 
 try_to_convert() {
     if is_unsafe_to_activate ; then
-	cat <<EOF
-error: Unable to enable dependency based boot system.
-info: Please check out this manually.
-info: Refusing to convert boot sequence until this is fixed
-info: See http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot
-info: for more information on how to solve these issues.  Most likely,
-info: it is a bug in the binary package with the init.d script in
-info: question, and not with insserv and sysv-rc.
-EOF
+	db_input critical sysv-rc/unable-to-convert || [ $? -eq 30 ]
+	db_go || true
 	return 1
     else
 	# Ask if the legacy boot sequence should be converted to
@@ -167,7 +164,11 @@
 	fi
 	if [ -f $flagfile ] ; then
 	    # Still using legacy ordering, try to convert
-	    try_to_convert
+	    if try_to_convert ; then
+		:
+	    else
+		echo "error: Unable to migrate to dependency based boot sequencing."
+	    fi
 	fi
 	;;
     *)

Modified: sysvinit/trunk/debian/sysv-rc.templates
===================================================================
--- sysvinit/trunk/debian/sysv-rc.templates	2009-08-26 22:02:03 UTC (rev 1651)
+++ sysvinit/trunk/debian/sysv-rc.templates	2009-08-27 15:13:32 UTC (rev 1652)
@@ -27,3 +27,13 @@
  dependency loops, obsolete init.d scripts or other potential problem
  found nothing, and thus believe it is safe to convert the current
  system to use dependency based boot sequencing.
+
+Template: sysv-rc/unable-to-convert
+Type: note
+_Description: Unable to migrate to dependency based boot system.
+ Please check out this manually.  Refusing to migrate to dependency
+ based boot sequencing until this is fixed. See
+ http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot for more
+ information on how to solve the issues blocking the migration.  Most
+ likely, it is a bug in the binary package with the init.d script in
+ question, and not with insserv and sysv-rc.




More information about the Pkg-sysvinit-commits mailing list