From 331434d0bb2f7bd1996566abb20e975cb234c878 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 28 Oct 2012 13:55:27 -0400 Subject: Revert "Support systemd in dh_installinit and postinst/postrm" This reverts commit a0a7bb3433cba64677cf25c469d626552da9f356. New patch sent. --- autoscripts/postinst-init | 6 ----- autoscripts/postinst-init-nostart | 6 ----- autoscripts/postinst-init-restart | 6 ----- autoscripts/postrm-init | 7 ------ debian/changelog | 2 -- dh_installinit | 52 ++++++--------------------------------- 6 files changed, 7 insertions(+), 72 deletions(-) diff --git a/autoscripts/postinst-init b/autoscripts/postinst-init index f5371ce8..2430b2c0 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 ec6bdbd6..7a1bd5e8 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 862f9cc3..35bba207 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 61dcfc53..1c292982 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 c57df59a..0fdbbd2d 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 9d9fb0c5..9c8c1550 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 [S>] [B<--name=>I] [B<-n>] [B<-R>] =head1 DESCRIPTION B 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 and F and F commands needed to set up the symlinks in F to start and stop @@ -42,17 +42,6 @@ build directory. If this exists, it is installed into etc/init/I.conf in the package build directory. -=item debian/I.service - -If this exists, it is installed into lib/systemd/system/I.service in -the package build directory. - -=item debian/I.tmpfile - -If this exists, it is installed into usr/lib/tmpfiles.d/I.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/F/F scripts. =item B<-o>, B<--onlyscripts> Only modify F/F/F 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 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 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 Steve Langasek -Michael Stapelberg - =cut -- cgit v1.2.3