summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Bogatov <KAction@gnu.org>2016-08-31 14:24:35 +0300
committerDmitry Bogatov <KAction@gnu.org>2016-08-31 14:25:26 +0300
commit0319b273e2ea6cca679adc72c5d49e2ded1e989e (patch)
tree3c9071e02b863f814323a10b37e649186bfd06f0
parentf4ab345fd51a86db9eccc7231bdd16db375ea2d0 (diff)
Do not create /etc/service symbolic link in maintainer script of -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.
-rw-r--r--debian/changelog4
-rw-r--r--debian/dh-runit.install1
-rwxr-xr-xdh_runit1
-rw-r--r--preinst-runit24
4 files changed, 4 insertions, 26 deletions
diff --git a/debian/changelog b/debian/changelog
index 3b6d29f..6c20df2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,10 @@ dh-runit (1.6) UNRELEASED; urgency=medium
3 * Do not create /etc/runit/runsvdir/default directory. Instead, it is 3 * Do not create /etc/runit/runsvdir/default directory. Instead, it is
4 provided by runit binary package. It saved us trouble of ensuring, 4 provided by runit binary package. It saved us trouble of ensuring,
5 that directory is removed at apporiate time. 5 that directory is removed at apporiate time.
6 * Do not create /etc/service symbolic link in maintainer script of
7 -run packages. It simplifies maintainace at cost of creation
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.
6 10
7 -- Dmitry Bogatov <KAction@gnu.org> Wed, 31 Aug 2016 14:00:10 +0300 11 -- Dmitry Bogatov <KAction@gnu.org> Wed, 31 Aug 2016 14:00:10 +0300
8 12
diff --git a/debian/dh-runit.install b/debian/dh-runit.install
index 5b296b5..bc52d23 100644
--- a/debian/dh-runit.install
+++ b/debian/dh-runit.install
@@ -1,5 +1,4 @@
1dh_runit /usr/bin 1dh_runit /usr/bin
2preinst-runit /usr/share/debhelper/autoscripts
3postinst-runit /usr/share/debhelper/autoscripts 2postinst-runit /usr/share/debhelper/autoscripts
4prerm-runit /usr/share/debhelper/autoscripts 3prerm-runit /usr/share/debhelper/autoscripts
5postrm-runit /usr/share/debhelper/autoscripts 4postrm-runit /usr/share/debhelper/autoscripts
diff --git a/dh_runit b/dh_runit
index 6bce272..5dbbb6e 100755
--- a/dh_runit
+++ b/dh_runit
@@ -52,7 +52,6 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) {
52 my $tmp = tmpdir($pkg); 52 my $tmp = tmpdir($pkg);
53 my $sv_dir = "$tmp/etc/sv"; 53 my $sv_dir = "$tmp/etc/sv";
54 54
55 runit_autoscript($pkg, 'preinst', '');
56 install_dir($sv_dir); 55 install_dir($sv_dir);
57 56
58 for (@entries) { 57 for (@entries) {
diff --git a/preinst-runit b/preinst-runit
deleted file mode 100644
index 23d8792..0000000
--- a/preinst-runit
+++ /dev/null
@@ -1,24 +0,0 @@
1# -*- shell-script -*-
2SV_CURRENT=/etc/runit/runsvdir/current
3SV_DEFAULT=/etc/runit/runsvdir/default
4SV_DIR=/etc/service
5
6if [ ! -e "$SV_CURRENT" ] ; then
7 ln -s default "$SV_CURRENT"
8elif [ ! -L "$SV_CURRENT" ] ; then
9 echo "unsupported: $SV_CURRENT exists, but is not symbolic link"
10 exit 1
11fi
12
13if [ ! -e "$SV_DIR" ] ; then
14 ln -sn "$SV_CURRENT" "$SV_DIR"
15fi
16
17if [ "$(readlink "$SV_DIR")" != "$SV_CURRENT" ] ; then
18 echo "unsupported: $SV_DIR exists, but does not point to $SV_CURRENT"
19 exit 1
20fi
21
22# Local Variables:
23# eval: (sh-set-shell "sh" t nil)
24# End: