summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Bogatov <KAction@debian.org>2019-05-28 04:35:57 +0000
committerDmitry Bogatov <KAction@debian.org>2019-05-28 04:36:07 +0000
commit9896a453b092edfc871450389569315ef72fd767 (patch)
treee3e6d46fcdd0e5ca7bd660847fc8cda0951cfa89
parentcb411affcbc2eb183ee5f35e50c3863c0b94f98a (diff)
Change path of "noreplace" flag file
First of all, "noreplace" flag file is architecture-independent and is not meant to be edited by system administrator, so it does not belong to /var. New namings scheme provides more options for extensibility, i.e introducing more flag files. While it is definitely not good thing to have, it seems, unfortunately, necessary to support, e.g uninstalled-not-purged situation.
-rwxr-xr-xdh_runit4
-rw-r--r--t/928935.t2
2 files changed, 3 insertions, 3 deletions
diff --git a/dh_runit b/dh_runit
index 4c9820e..3f45866 100755
--- a/dh_runit
+++ b/dh_runit
@@ -62,8 +62,8 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) {
62 my $name = $conf->{name} || basename($path); 62 my $name = $conf->{name} || basename($path);
63 63
64 if ($conf->{noreplace}) { 64 if ($conf->{noreplace}) {
65 make_path("${tmp}/var/lib/runit/noreplace/"); 65 make_path("${tmp}/usr/share/runit/meta/${name}/");
66 open(my $fh, ">", "${tmp}/var/lib/runit/noreplace/${name}") 66 open(my $fh, ">", "${tmp}/usr/share/runit/meta/${name}/noreplace")
67 || die $!; 67 || die $!;
68 close($fh); 68 close($fh);
69 } 69 }
diff --git a/t/928935.t b/t/928935.t
index e31756b..52774ed 100644
--- a/t/928935.t
+++ b/t/928935.t
@@ -6,5 +6,5 @@ use T;
6 6
7system_ok('dh_runit', 'debian/test.runscript', 'name=test,noreplace'); 7system_ok('dh_runit', 'debian/test.runscript', 'name=test,noreplace');
8 8
9my $noreplace = 'debian/dh-runit-test/var/lib/runit/noreplace/test'; 9my $noreplace = 'debian/dh-runit-test/usr/share/runit/meta/test/noreplace';
10ok(-f $noreplace, 'noreplace file correctly created'); 10ok(-f $noreplace, 'noreplace file correctly created');