]> git.donarmstrong.com Git - debhelper.git/commitdiff
r547: * Use invoke-rc.d always now that it is in policy. Fall back to old behavior
authorjoey <joey>
Mon, 16 Sep 2002 00:05:19 +0000 (00:05 +0000)
committerjoey <joey>
Mon, 16 Sep 2002 00:05:19 +0000 (00:05 +0000)
     if invoke-rc.d is not present, so versioned deps on sysvinit are not
     needed.

autoscripts/postinst-init
autoscripts/prerm-init
autoscripts/prerm-init-norestart
debhelper.pod
debian/changelog
dh_installdocs
dh_installinit

index 051f77474c40adc46ec12d7c32046ed70a31845c..b5bd7a5798870f5e7d311e1ed3f5867852b9df6c 100644 (file)
@@ -1,4 +1,8 @@
 if [ -x "/etc/init.d/#SCRIPT#" ]; then
        update-rc.d #SCRIPT# #INITPARMS# >/dev/null
-       /etc/init.d/#SCRIPT# start
+       if [ -x /usr/sbin/invoke-rc.d ]; then
+               invoke-rc.d #SCRIPT# start
+       else
+               /etc/init.d/#SCRIPT# start
+       fi
 fi
index 9882c7c07a853356e3dd543805902369dde12347..eab98c72f385f26e0707b191f2b89a13cec7c61a 100644 (file)
@@ -1,3 +1,7 @@
 if [ -x "/etc/init.d/#SCRIPT#" ]; then
-       /etc/init.d/#SCRIPT# stop
+       if [ -x /usr/sbin/invoke-rc.d ] ; then
+               invoke-rc.d #SCRIPT# stop
+       else
+               /etc/init.d/#SCRIPT# stop
+       fi
 fi
index 96fcea441d76cf1da8ca569f15c8cc69706b2739..fb99152472bd99c18cf29003b9fac868112c0a55 100644 (file)
@@ -1,3 +1,7 @@
 if [ -x "/etc/init.d/#SCRIPT#" ] && [ "$1" = remove ]; then
-       /etc/init.d/#SCRIPT# stop
+       if [ -x /usr/sbin/invoke-rc.d ] ; then
+               invoke-rc.d #SCRIPT# stop
+       else
+               /etc/init.d/#SCRIPT# stop
+       fi
 fi
index dae701c93174acf07bff260740757b25f82c4b11..d6ecac7f89e9d43c723692652e2edfe75b84c722 100644 (file)
@@ -288,11 +288,6 @@ the generated dependancy line in the shlibs file.
 
 =item -
 
-dh_installinit uses the new invoke-rc.d program in its generated maintainer
-scripts. (This may later be rolled back into V3).
-
-=item -
-
 You are encouraged to put the new ${misc:Depends} into debian/control to
 suppliment the ${shlibs:Depends} field. In particular, the new
 dh_installinit feature needs a versioned dependency on sysvinit.
index a98acf0184731628bfea3086d3abf5843169b3cb..0e4bd9c00fe6b7762beefa930ec6318fd79ed36f 100644 (file)
@@ -1,3 +1,11 @@
+debhelper (4.1.8) unstable; urgency=low
+
+  * Use invoke-rc.d always now that it is in policy. Fall back to old behavior
+    if invoke-rc.d is not present, so versioned deps on sysvinit are not
+    needed.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 15 Sep 2002 20:07:41 -0400
+
 debhelper (4.1.7) unstable; urgency=low
 
   * dh_builddeb(1): It's --filename, not --name. Closes: #160151
index 7a8fc461a28375a40d04f8ffac68d95ca4446a68..7f8e8bf4cdaff127cf2ce79101c6862c09e1d2e0 100755 (executable)
@@ -169,16 +169,6 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                }
        }
 
-#      # Add in the /usr/doc compatibility symlinks code.
-#      if (! $dh{NOSCRIPTS}) {
-#              autoscript($package,"postinst","postinst-doc",
-#                      "s/#PACKAGE#/$package/g",
-#              );
-#              autoscript($package,"prerm","prerm-doc",
-#                      "s/#PACKAGE#/$package/g",
-#              );
-#      }
-
        # Handle doc-base files. There are two filename formats, the usual
        # plus an extended format (debian/package.*).
        my %doc_ids;
index b20a1114780e66f2f06247b27d621d0fcd9b443d..c5652c457094f193796cc2d8dd02de0f562964f6 100755 (executable)
@@ -30,12 +30,6 @@ If a file named debian/package.default exists, then it is installed into
 etc/default/package in the package build directory, with "package" replaced
 by the package name.
 
-Historically this program generates postrm and prerm commands that run the
-init scripts by hand. In V4 mode, it uses the invoke-rc.d program instead.
-See L<debhelper(1)> for details about V4 mode. If you decide to use this, you
-should make your package depend on sysvinit (>= 2.80-1) (this dependency is
-added to ${misc:Depends} by this program in V4 mode).
-
 =head1 OPTIONS
 
 =over 4
@@ -141,30 +135,19 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 
                my $substvaradded=0;
                if (! $dh{NOSCRIPTS}) {
-                       # In v4 mode, use invoke-rc.d versions of the
-                       # autoscripts; prior to that use the old,
-                       # manual-invoking versions.
-                       my $tailstr="";
-                       if (! compat(3)) {
-                               $tailstr="-invoke";
-                               addsubstvar($package, "misc:Depends", "sysvinit", ">= 2.80-1");
-                               $substvaradded=1;
-                       }
-                       autoscript($package,"postinst", "postinst-init$tailstr",
+                       autoscript($package,"postinst", "postinst-init",
                                "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
                        # -r on the command line sets R_FLAG. If it's set,
                        # there  is no restart on upgrade, so don't stop
                        # daemon. (It's ok that it's always started.)
                        if ($dh{R_FLAG}) {
-                               autoscript($package,"prerm","prerm-init-norestart$tailstr",
+                               autoscript($package,"prerm","prerm-init-norestart",
                                        "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
                        }
                        else {
-                               autoscript($package,"prerm","prerm-init$tailstr",
+                               autoscript($package,"prerm","prerm-init",
                                        "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
                        }
-                       # This script just removes the links, so it's the
-                       # same for all varients.
                        autoscript($package,"postrm","postrm-init",
                                "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
                }