diff options
author | Dmitry Bogatov <KAction@gnu.org> | 2016-08-31 14:24:35 +0300 |
---|---|---|
committer | Dmitry Bogatov <KAction@gnu.org> | 2016-08-31 14:25:26 +0300 |
commit | 0319b273e2ea6cca679adc72c5d49e2ded1e989e (patch) | |
tree | 3c9071e02b863f814323a10b37e649186bfd06f0 | |
parent | f4ab345fd51a86db9eccc7231bdd16db375ea2d0 (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/changelog | 4 | ||||
-rw-r--r-- | debian/dh-runit.install | 1 | ||||
-rwxr-xr-x | dh_runit | 1 | ||||
-rw-r--r-- | preinst-runit | 24 |
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 @@ | |||
1 | dh_runit /usr/bin | 1 | dh_runit /usr/bin |
2 | preinst-runit /usr/share/debhelper/autoscripts | ||
3 | postinst-runit /usr/share/debhelper/autoscripts | 2 | postinst-runit /usr/share/debhelper/autoscripts |
4 | prerm-runit /usr/share/debhelper/autoscripts | 3 | prerm-runit /usr/share/debhelper/autoscripts |
5 | postrm-runit /usr/share/debhelper/autoscripts | 4 | postrm-runit /usr/share/debhelper/autoscripts |
@@ -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 -*- | ||
2 | SV_CURRENT=/etc/runit/runsvdir/current | ||
3 | SV_DEFAULT=/etc/runit/runsvdir/default | ||
4 | SV_DIR=/etc/service | ||
5 | |||
6 | if [ ! -e "$SV_CURRENT" ] ; then | ||
7 | ln -s default "$SV_CURRENT" | ||
8 | elif [ ! -L "$SV_CURRENT" ] ; then | ||
9 | echo "unsupported: $SV_CURRENT exists, but is not symbolic link" | ||
10 | exit 1 | ||
11 | fi | ||
12 | |||
13 | if [ ! -e "$SV_DIR" ] ; then | ||
14 | ln -sn "$SV_CURRENT" "$SV_DIR" | ||
15 | fi | ||
16 | |||
17 | if [ "$(readlink "$SV_DIR")" != "$SV_CURRENT" ] ; then | ||
18 | echo "unsupported: $SV_DIR exists, but does not point to $SV_CURRENT" | ||
19 | exit 1 | ||
20 | fi | ||
21 | |||
22 | # Local Variables: | ||
23 | # eval: (sh-set-shell "sh" t nil) | ||
24 | # End: | ||