summaryrefslogtreecommitdiff
path: root/dh_runit
diff options
context:
space:
mode:
Diffstat (limited to 'dh_runit')
-rwxr-xr-xdh_runit17
1 files changed, 15 insertions, 2 deletions
diff --git a/dh_runit b/dh_runit
index 5b345d6..f7c81a2 100755
--- a/dh_runit
+++ b/dh_runit
@@ -10,11 +10,12 @@ use feature 'signatures';
10no warnings 'experimental'; 10no warnings 'experimental';
11 11
12sub parse_options($opts) { 12sub parse_options($opts) {
13 my $conf = { enable => 1 }; 13 my $conf = { enable => 1, since => '0.0-0' };
14 for my $opt (split(/,/, $opts)) { 14 for my $opt (split(/,/, $opts)) {
15 given($opt) { 15 given($opt) {
16 when (/^disable$/) { $conf->{enable} = 0; }; 16 when (/^disable$/) { $conf->{enable} = 0; };
17 when (/^name=(.*)$/) { $conf->{name} = $1; }; 17 when (/^name=(.*)$/) { $conf->{name} = $1; };
18 when (/^since=(.*)$/) { $conf->{since} = $1; };
18 when (/^logscript$/) { $conf->{logscript} = 1}; 19 when (/^logscript$/) { $conf->{logscript} = 1};
19 when (/^defaults$/) { "do nothing"; }; 20 when (/^defaults$/) { "do nothing"; };
20 default { error("unknown option `$opt'"); } 21 default { error("unknown option `$opt'"); }
@@ -73,7 +74,8 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) {
73 74
74 my $substitutions = { 75 my $substitutions = {
75 NAME => $name, 76 NAME => $name,
76 ENABLE => $conf->{enable} ? "yes" : "no" 77 ENABLE => $conf->{enable} ? "yes" : "no",
78 SINCE => $conf->{since}
77 }; 79 };
78 80
79 runit_autoscript($pkg, 'postrm', $substitutions); 81 runit_autoscript($pkg, 'postrm', $substitutions);
@@ -166,6 +168,17 @@ the rights of the dedicated user. Specifying this option produces
166an error if the path argument names a directory that already 168an error if the path argument names a directory that already
167contains a F</log/run> script. 169contains a F</log/run> script.
168 170
171=item I<since>
172
173Specify what version of package introduced runscript. Correct
174installation of symlinks in F</etc/service> requires this information to
175correctly distinguish cases, when system administrator deliberately
176disabled service and case, when runscript was not provided in previous
177version of package. See #923233.
178
179If this option is not specified, it means that runscript was provided
180all history of package.
181
169=item I<defaults> 182=item I<defaults>
170 183
171If you don't need other options, specify this one. 184If you don't need other options, specify this one.