summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2012-10-28 13:55:27 -0400
committerJoey Hess <joey@kitenet.net>2012-10-28 13:55:27 -0400
commit331434d0bb2f7bd1996566abb20e975cb234c878 (patch)
tree5f273fc05ae004d794cf1ebdb8bc22f4ccc880ac
parent720ace23a372cabe1950f64bb0de279856a8e1b8 (diff)
Revert "Support systemd in dh_installinit and postinst/postrm"
This reverts commit a0a7bb3433cba64677cf25c469d626552da9f356. New patch sent.
-rw-r--r--autoscripts/postinst-init6
-rw-r--r--autoscripts/postinst-init-nostart6
-rw-r--r--autoscripts/postinst-init-restart6
-rw-r--r--autoscripts/postrm-init7
-rw-r--r--debian/changelog2
-rwxr-xr-xdh_installinit52
6 files changed, 7 insertions, 72 deletions
diff --git a/autoscripts/postinst-init b/autoscripts/postinst-init
index f5371ce..2430b2c 100644
--- a/autoscripts/postinst-init
+++ b/autoscripts/postinst-init
@@ -1,10 +1,4 @@
if [ -x "/etc/init.d/#SCRIPT#" ]; then
- # In case this system is running systemd, we need to ensure that all
- # necessary tmpfiles (if any) are created before starting.
- if [ -d /sys/fs/cgroup/systemd ] ; then
- systemd-tmpfiles --create >/dev/null || true
- fi
-
update-rc.d #SCRIPT# #INITPARMS# >/dev/null
invoke-rc.d #SCRIPT# start || #ERROR_HANDLER#
fi
diff --git a/autoscripts/postinst-init-nostart b/autoscripts/postinst-init-nostart
index ec6bdbd..7a1bd5e 100644
--- a/autoscripts/postinst-init-nostart
+++ b/autoscripts/postinst-init-nostart
@@ -1,9 +1,3 @@
if [ -x "/etc/init.d/#SCRIPT#" ]; then
- # In case this system is running systemd, we need to ensure that all
- # necessary tmpfiles (if any) are created before starting.
- if [ -d /sys/fs/cgroup/systemd ] ; then
- systemd-tmpfiles --create >/dev/null || true
- fi
-
update-rc.d #SCRIPT# #INITPARMS# >/dev/null || #ERROR_HANDLER#
fi
diff --git a/autoscripts/postinst-init-restart b/autoscripts/postinst-init-restart
index 862f9cc..35bba20 100644
--- a/autoscripts/postinst-init-restart
+++ b/autoscripts/postinst-init-restart
@@ -1,10 +1,4 @@
if [ -x "/etc/init.d/#SCRIPT#" ]; then
- # In case this system is running systemd, we need to ensure that all
- # necessary tmpfiles (if any) are created before starting.
- if [ -d /sys/fs/cgroup/systemd ] ; then
- systemd-tmpfiles --create >/dev/null || true
- fi
-
update-rc.d #SCRIPT# #INITPARMS# >/dev/null
if [ -n "$2" ]; then
_dh_action=restart
diff --git a/autoscripts/postrm-init b/autoscripts/postrm-init
index 61dcfc5..1c29298 100644
--- a/autoscripts/postrm-init
+++ b/autoscripts/postrm-init
@@ -1,10 +1,3 @@
if [ "$1" = "purge" ] ; then
update-rc.d #SCRIPT# remove >/dev/null
fi
-
-
-# In case this system is running systemd, we make systemd reload the unit files
-# to pick up changes.
-if [ -d /sys/fs/cgroup/systemd ] ; then
- systemctl --system daemon-reload >/dev/null || true
-fi
diff --git a/debian/changelog b/debian/changelog
index c57df59..0fdbbd2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,8 +19,6 @@ debhelper (9.20120609) UNRELEASED; urgency=low
* dh_installdocs: Support having the same document id in different binary
packages built from the same source.
Closes: #525821 Thanks, Don Armstrong
- * dh_installinit: Support systemd.
- Closes: #690399 Thanks, Michael Stapelberg
* dh_installdeb: Avoid unnecessary is_udeb tests. Closes: #691398
* Updated German man page translation. Closes: #691557
diff --git a/dh_installinit b/dh_installinit
index 9d9fb0c..9c8c155 100755
--- a/dh_installinit
+++ b/dh_installinit
@@ -2,7 +2,7 @@
=head1 NAME
-dh_installinit - install service init files into package build directories
+dh_installinit - install init scripts and/or upstart jobs into package build directories
=cut
@@ -16,8 +16,8 @@ B<dh_installinit> [S<I<debhelper options>>] [B<--name=>I<name>] [B<-n>] [B<-R>]
=head1 DESCRIPTION
B<dh_installinit> is a debhelper program that is responsible for installing
-init scripts with associated defaults files, as well as upstart job files,
-and systemd service files into package build directories.
+init scripts with associated defaults files, as well as upstart job files
+into package build directories.
It also automatically generates the F<postinst> and F<postrm> and F<prerm>
commands needed to set up the symlinks in F</etc/rc*.d/> to start and stop
@@ -42,17 +42,6 @@ build directory.
If this exists, it is installed into etc/init/I<package>.conf in the package
build directory.
-=item debian/I<package>.service
-
-If this exists, it is installed into lib/systemd/system/I<package>.service in
-the package build directory.
-
-=item debian/I<package>.tmpfile
-
-If this exists, it is installed into usr/lib/tmpfiles.d/I<package>.conf in the
-package build directory. (The tmpfiles.d mechanism is currently only used
-by systemd.)
-
=back
=head1 OPTIONS
@@ -66,10 +55,9 @@ Do not modify F<postinst>/F<postrm>/F<prerm> scripts.
=item B<-o>, B<--onlyscripts>
Only modify F<postinst>/F<postrm>/F<prerm> scripts, do not actually install any init
-script, default files, upstart job or systemd service file. May be useful if
-the init script, upstart job or systemd service file is shipped and/or
-installed by upstream in a way that doesn't make it easy to let
-B<dh_installinit> find it.
+script, default files, or upstart job. May be useful if the init script or
+upstart job is shipped and/or installed by upstream in a way that doesn't
+make it easy to let B<dh_installinit> find it.
=item B<-R>, B<--restart-after-upgrade>
@@ -183,26 +171,6 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
$script=$package;
}
- my $service=pkgfile($package,"service");
- if ($service ne '' && ! $dh{ONLYSCRIPTS}) {
- my $path="$tmp/lib/systemd/system";
- if (! -d "$path") {
- doit("install","-d","$path");
- }
-
- doit("install","-p","-m644",$service,"$path/$script.service");
- }
-
- my $tmpfile=pkgfile($package,"tmpfile");
- if ($tmpfile ne '' && ! $dh{ONLYSCRIPTS}) {
- my $path="$tmp/usr/lib/tmpfiles.d";
- if (! -d "$path") {
- doit("install","-d","$path");
- }
-
- doit("install","-p","-m644",$tmpfile,"$path/$script.conf");
- }
-
my $job=pkgfile($package,"upstart");
if ($job ne '' && ! $dh{ONLYSCRIPTS}) {
@@ -235,11 +203,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
error("Can't use --init-script with an upstart job");
}
- # NB: The case that only $tmpfile is set makes no sense. The
- # tmpfiles.d(5) mechanism is only available when using systemd (at
- # least currently), so there has to be an init script which does the
- # same thing for sysvinit.
- if ($service ne '' || $job ne '' || $init ne '' || $dh{ONLYSCRIPTS}) {
+ if ($job ne '' || $init ne '' || $dh{ONLYSCRIPTS}) {
# 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".
@@ -301,6 +265,4 @@ Joey Hess <joeyh@debian.org>
Steve Langasek <steve.langasek@canonical.com>
-Michael Stapelberg <stapelberg@debian.org>
-
=cut