From 8ff72d717c3634204653ebccc0913691b2dbd562 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Sat, 3 Sep 2016 20:01:19 +0300 Subject: Do not create symbolic link in /etc/runit/runsvdir/ in maintainer script, make it part of binary package. It makes sure, that dpkg will make right thing. --- debian/changelog | 3 +++ debian/dh-runit.install | 1 - dh_runit | 3 ++- postinst-runit | 1 - prerm-runit | 1 - 5 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 postinst-runit diff --git a/debian/changelog b/debian/changelog index 6c20df2..2a0378f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,9 @@ dh-runit (1.6) UNRELEASED; urgency=medium -run packages. It simplifies maintainace at cost of creation of empty directories in runit binary package. But since it is rare to install runit, but none of -run packages, trade-off seems justified. + * Do not create symbolic link in /etc/runit/runsvdir/ in maintainer script, + make it part of binary package. It makes sure, that dpkg will make right + thing. -- Dmitry Bogatov Wed, 31 Aug 2016 14:00:10 +0300 diff --git a/debian/dh-runit.install b/debian/dh-runit.install index bc52d23..be3dc61 100644 --- a/debian/dh-runit.install +++ b/debian/dh-runit.install @@ -1,5 +1,4 @@ dh_runit /usr/bin -postinst-runit /usr/share/debhelper/autoscripts prerm-runit /usr/share/debhelper/autoscripts postrm-runit /usr/share/debhelper/autoscripts runit.pm /usr/share/perl5/Debian/Debhelper/Sequence diff --git a/dh_runit b/dh_runit index 5dbbb6e..37a24c0 100755 --- a/dh_runit +++ b/dh_runit @@ -74,7 +74,8 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) { install_dir("$tmp/var/lib/runit/supervise/$name"); if ($conf->{enable}) { - runit_autoscript($pkg, 'postinst', "s/#NAME#/$name/"); + make_symlink("/etc/runit/runsvdir/default/$name", + "/etc/sv/$name", $tmp); } runit_autoscript($pkg, 'prerm', "s/#NAME#/$name/"); runit_autoscript($pkg, 'postrm', "s/#NAME#/$name/"); diff --git a/postinst-runit b/postinst-runit deleted file mode 100644 index 44b062e..0000000 --- a/postinst-runit +++ /dev/null @@ -1 +0,0 @@ -ln -sf '/etc/sv/#NAME#' /etc/runit/runsvdir/default diff --git a/prerm-runit b/prerm-runit index 35496f2..633533d 100644 --- a/prerm-runit +++ b/prerm-runit @@ -1,2 +1 @@ sv force-shutdown '#NAME#' -rm -f '/etc/service/#NAME#' -- cgit v1.2.3