From 4c485bc074b00f1d463f7f8cf20720dab72b3bf5 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Wed, 29 May 2019 04:44:36 +0000 Subject: 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 --- dh_runit | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dh_runit') 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}}) { create_empty_file("${tmp}/usr/share/runit/meta/${name}/noreplace"); } + # These files allow handling of uninstalled-not-purged situation. + create_empty_file("${tmp}/usr/share/runit/meta/${name}/installed"); + create_empty_file("${tmp}/etc/sv/${name}/.meta/installed"); + if ( -f $path) { install_dir("$sv_dir/$name"); install_prog($path, "$sv_dir/$name/run"); -- cgit v1.2.3