summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Debian/Debhelper/Dh_Getopt.pm4
-rw-r--r--debian/changelog12
-rwxr-xr-xdh_installinit25
-rw-r--r--doc/PROGRAMMING3
4 files changed, 36 insertions, 8 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm
index 0c807b72..c7c831ca 100644
--- a/Debian/Debhelper/Dh_Getopt.pm
+++ b/Debian/Debhelper/Dh_Getopt.pm
@@ -94,7 +94,9 @@ sub parseopts {
"no-package=s" => \&ExcludePackage,
"n" => \$options{NOSCRIPTS},
- "noscripts" => \$options{NOSCRIPTS},
+ "noscripts" => \$options{ONLYSCRIPTS},
+ "o" => \$options{ONLYSCRIPTS},
+ "onlyscripts" => \$options{ONLYSCRIPTS},
"x" => \$options{INCLUDE_CONFFILES}, # is -x for some unknown historical reason..
"include-conffiles" => \$options{INCLUDE_CONFFILES},
diff --git a/debian/changelog b/debian/changelog
index c27423c4..5fe53a34 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+debhelper (5.0.14) unstable; urgency=low
+
+ * dh_installinit: If run with -o, do the inverse of -n and only
+ set up maintainer script snippets, w/o installing any files.
+ Useful for those edge cases where the init script is provided by upstream
+ and not easily installed by dh_installinit but where it's worth letting
+ it manage the maintainer scripts anyway. Closes: #140881, #184980
+ * -o might be added for other similar commands later if there is any
+ reason to. And yeah, it means that -no is close to a no-op..
+
+ -- Joey Hess <joeyh@debian.org> Sun, 8 Jan 2006 17:21:52 -0500
+
debhelper (5.0.13) unstable; urgency=low
[ Joey Hess ]
diff --git a/dh_installinit b/dh_installinit
index aba32b84..36e9d716 100755
--- a/dh_installinit
+++ b/dh_installinit
@@ -38,6 +38,13 @@ by the package name.
Do not modify postinst/postrm/prerm scripts.
+=item B<-o>, B<--onlyscripts>
+
+Only modify postinst/postrm/prerm scripts, do not actually install any init
+script or default files. May be useful if the init script is shipped and/or
+installed by upstream in a way that doesn't make it easy to let
+dh_installinit find it.
+
=item B<-r>, B<--no-restart-on-upgrade>
Do not restart init script on upgrade.
@@ -81,6 +88,8 @@ preference to the files it normally installs.
This parameter is deprecated, use the --name parameter instead.
+=item B<
+
=item B<--error-handler=>I<function>
Call the named shell function if running the init script fails. The
@@ -130,20 +139,22 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
pkgfile($package,"init.d");
my $default=pkgfile($package,'default');
- if ($default ne '') {
+ if ($default ne '' && ! $dh{ONLYSCRIPTS}) {
if (! -d "$tmp/etc/default") {
doit("install","-d","$tmp/etc/default");
}
doit("install","-p","-m644",$default,"$tmp/etc/default/$script");
}
- if ($init ne '') {
- if (! -d "$tmp/etc/init.d") {
- doit("install","-d","$tmp/etc/init.d");
+ if ($init ne '' || $dh{ONLYSCRIPTS}) {
+ if (! $dh{ONLYSCRIPTS}) {
+ if (! -d "$tmp/etc/init.d") {
+ doit("install","-d","$tmp/etc/init.d");
+ }
+
+ doit("install","-p","-m755",$init,"$tmp/etc/init.d/$script");
}
-
- doit("install","-p","-m755",$init,"$tmp/etc/init.d/$script");
-
+
# This is set by the -u "foo" command line switch, it's
# the parameters to pass to update-rc.d. If not set,
# we have to say "defaults".
diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING
index 9996dc73..b87a8c60 100644
--- a/doc/PROGRAMMING
+++ b/doc/PROGRAMMING
@@ -93,6 +93,9 @@ switch variable description
packages
-n NOSCRIPTS if set, do not make any modifications to the
package's postinst, postrm, etc scripts.
+-o ONLYSCRIPTS if set, only make modifications to the
+ package's scripts, but don't look for or
+ install associated files.
-X EXCLUDE exclude a something from processing (you
decide what this means for your program)
(This is an array)