summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Bogatov <KAction@gnu.org>2016-09-03 20:01:19 +0300
committerDmitry Bogatov <KAction@gnu.org>2016-09-03 20:01:19 +0300
commit8ff72d717c3634204653ebccc0913691b2dbd562 (patch)
treed3408c48449c0060c371cb6840842c8b0c2cd2c2
parent0319b273e2ea6cca679adc72c5d49e2ded1e989e (diff)
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.
-rw-r--r--debian/changelog3
-rw-r--r--debian/dh-runit.install1
-rwxr-xr-xdh_runit3
-rw-r--r--postinst-runit1
-rw-r--r--prerm-runit1
5 files changed, 5 insertions, 4 deletions
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
7 -run packages. It simplifies maintainace at cost of creation 7 -run packages. It simplifies maintainace at cost of creation
8 of empty directories in runit binary package. But since it is rare 8 of empty directories in runit binary package. But since it is rare
9 to install runit, but none of -run packages, trade-off seems justified. 9 to install runit, but none of -run packages, trade-off seems justified.
10 * Do not create symbolic link in /etc/runit/runsvdir/ in maintainer script,
11 make it part of binary package. It makes sure, that dpkg will make right
12 thing.
10 13
11 -- Dmitry Bogatov <KAction@gnu.org> Wed, 31 Aug 2016 14:00:10 +0300 14 -- Dmitry Bogatov <KAction@gnu.org> Wed, 31 Aug 2016 14:00:10 +0300
12 15
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 @@
1dh_runit /usr/bin 1dh_runit /usr/bin
2postinst-runit /usr/share/debhelper/autoscripts
3prerm-runit /usr/share/debhelper/autoscripts 2prerm-runit /usr/share/debhelper/autoscripts
4postrm-runit /usr/share/debhelper/autoscripts 3postrm-runit /usr/share/debhelper/autoscripts
5runit.pm /usr/share/perl5/Debian/Debhelper/Sequence 4runit.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}}) {
74 install_dir("$tmp/var/lib/runit/supervise/$name"); 74 install_dir("$tmp/var/lib/runit/supervise/$name");
75 75
76 if ($conf->{enable}) { 76 if ($conf->{enable}) {
77 runit_autoscript($pkg, 'postinst', "s/#NAME#/$name/"); 77 make_symlink("/etc/runit/runsvdir/default/$name",
78 "/etc/sv/$name", $tmp);
78 } 79 }
79 runit_autoscript($pkg, 'prerm', "s/#NAME#/$name/"); 80 runit_autoscript($pkg, 'prerm', "s/#NAME#/$name/");
80 runit_autoscript($pkg, 'postrm', "s/#NAME#/$name/"); 81 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 @@
1ln -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 @@
1sv force-shutdown '#NAME#' sv force-shutdown '#NAME#'
2rm -f '/etc/service/#NAME#'