retitle 529280 open-iscsi is uninstallable when invoke-rc.d fails
tags 529280 + patch
thanks

The problem is this automatically generated code from debhelper:

  # Automatically added by dh_installinit
  if [ -x "/etc/init.d/open-iscsi" ]; then
          update-rc.d open-iscsi start 45 S . stop 81 0 6 . >/dev/null
          if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
                  invoke-rc.d open-iscsi start || exit $?
          else
                  /etc/init.d/open-iscsi start || exit $?
          fi
  fi

The 'exit $?' part return an error when invoke-rc.d.

One way to avoid this is to use the --error-handler argument for
dh_installinit, and ignore the error code .  Another is to use the
--no-start argument.  In this case, I suspect the latter is most
correct, as the open-iscsi script should only run once during boot as
it is currently implemented.  Here is a patch to implement it.

diff -ru open-iscsi-2.0.870~rc3/debian/rules 
open-iscsi-2.0.870~rc3-pere/debian/rules
--- open-iscsi-2.0.870~rc3/debian/rules 2009-09-05 10:04:17.000000000 +0200
+++ open-iscsi-2.0.870~rc3-pere/debian/rules    2009-09-05 10:11:53.000000000 
+0200
@@ -134,7 +134,7 @@
        dh_installchangelogs
        dh_installdocs
        dh_installexamples
-       dh_installinit -u 'start 45 S . stop 81 0 6 .'
+       dh_installinit -u 'start 45 S . stop 81 0 6 .' --no-start
        dh_installinit -u 'stop 80 0 6 .' --no-start --name=umountiscsi.sh
        dh_installman
        dh_link

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to