summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey>2002-09-16 00:05:19 +0000
committerjoey <joey>2002-09-16 00:05:19 +0000
commit2486063234469e39cce67055c5bd0644213724cf (patch)
tree22b33f6042b712ed78dd428894c881c3beaded7a
parent89a8e4df94d07ca360f97f57ff22ac8f7f7c3a5f (diff)
r547: * 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.
-rw-r--r--autoscripts/postinst-init6
-rw-r--r--autoscripts/prerm-init6
-rw-r--r--autoscripts/prerm-init-norestart6
-rw-r--r--debhelper.pod5
-rw-r--r--debian/changelog8
-rwxr-xr-xdh_installdocs10
-rwxr-xr-xdh_installinit23
7 files changed, 26 insertions, 38 deletions
diff --git a/autoscripts/postinst-init b/autoscripts/postinst-init
index 051f7747..b5bd7a57 100644
--- a/autoscripts/postinst-init
+++ b/autoscripts/postinst-init
@@ -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
diff --git a/autoscripts/prerm-init b/autoscripts/prerm-init
index 9882c7c0..eab98c72 100644
--- a/autoscripts/prerm-init
+++ b/autoscripts/prerm-init
@@ -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
diff --git a/autoscripts/prerm-init-norestart b/autoscripts/prerm-init-norestart
index 96fcea44..fb991524 100644
--- a/autoscripts/prerm-init-norestart
+++ b/autoscripts/prerm-init-norestart
@@ -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
diff --git a/debhelper.pod b/debhelper.pod
index dae701c9..d6ecac7f 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -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.
diff --git a/debian/changelog b/debian/changelog
index a98acf01..0e4bd9c0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/dh_installdocs b/dh_installdocs
index 7a8fc461..7f8e8bf4 100755
--- a/dh_installdocs
+++ b/dh_installdocs
@@ -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;
diff --git a/dh_installinit b/dh_installinit
index b20a1114..c5652c45 100755
--- a/dh_installinit
+++ b/dh_installinit
@@ -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/");
}