summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Bogatov <KAction@debian.org>2019-05-29 04:44:36 +0000
committerDmitry Bogatov <KAction@debian.org>2019-05-29 04:44:36 +0000
commit4c485bc074b00f1d463f7f8cf20720dab72b3bf5 (patch)
treef75ba13c10a40d9ee958876d8ce9e67c96cc947a
parent80597efafb9943e53b566d9d0f6ee7a54a667b12 (diff)
Create marker files for use by "invoke-run"
Create marker file in /usr/share, that is checked by "invoke-run". If marker file is absent, package was unstalled, but not purged (runscripts are conffiles), and service must be put into "down" state. To not break already-existing runscript, using "invoke-run", such check is only performed when it is known, that marker file existed. It can be known by checking presence of /etc/sv/{name}/.meta/installed. Gbp-Closes: #929693
-rwxr-xr-xdh_runit4
1 files changed, 4 insertions, 0 deletions
diff --git a/dh_runit b/dh_runit
index 9a302dd..4860172 100755
--- a/dh_runit
+++ b/dh_runit
@@ -96,6 +96,10 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) {
96 create_empty_file("${tmp}/usr/share/runit/meta/${name}/noreplace"); 96 create_empty_file("${tmp}/usr/share/runit/meta/${name}/noreplace");
97 } 97 }
98 98
99 # These files allow handling of uninstalled-not-purged situation.
100 create_empty_file("${tmp}/usr/share/runit/meta/${name}/installed");
101 create_empty_file("${tmp}/etc/sv/${name}/.meta/installed");
102
99 if ( -f $path) { 103 if ( -f $path) {
100 install_dir("$sv_dir/$name"); 104 install_dir("$sv_dir/$name");
101 install_prog($path, "$sv_dir/$name/run"); 105 install_prog($path, "$sv_dir/$name/run");