diff options
author | Dmitry Bogatov <KAction@gnu.org> | 2016-09-03 20:01:19 +0300 |
---|---|---|
committer | Dmitry Bogatov <KAction@gnu.org> | 2016-09-03 20:01:19 +0300 |
commit | 8ff72d717c3634204653ebccc0913691b2dbd562 (patch) | |
tree | d3408c48449c0060c371cb6840842c8b0c2cd2c2 | |
parent | 0319b273e2ea6cca679adc72c5d49e2ded1e989e (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/changelog | 3 | ||||
-rw-r--r-- | debian/dh-runit.install | 1 | ||||
-rwxr-xr-x | dh_runit | 3 | ||||
-rw-r--r-- | postinst-runit | 1 | ||||
-rw-r--r-- | prerm-runit | 1 |
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 @@ | |||
1 | dh_runit /usr/bin | 1 | dh_runit /usr/bin |
2 | postinst-runit /usr/share/debhelper/autoscripts | ||
3 | prerm-runit /usr/share/debhelper/autoscripts | 2 | prerm-runit /usr/share/debhelper/autoscripts |
4 | postrm-runit /usr/share/debhelper/autoscripts | 3 | postrm-runit /usr/share/debhelper/autoscripts |
5 | runit.pm /usr/share/perl5/Debian/Debhelper/Sequence | 4 | runit.pm /usr/share/perl5/Debian/Debhelper/Sequence |
@@ -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 @@ | |||
1 | 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 @@ | |||
1 | sv force-shutdown '#NAME#' | sv force-shutdown '#NAME#' | |
2 | rm -f '/etc/service/#NAME#' | ||