diff options
Diffstat (limited to 'dh_runit')
-rwxr-xr-x | dh_runit | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -9,7 +9,6 @@ dh_runit - install/enable runit runscripts | |||
9 | use strict; | 9 | use strict; |
10 | use Debian::Debhelper::Dh_Lib; | 10 | use Debian::Debhelper::Dh_Lib; |
11 | use File::Find; | 11 | use File::Find; |
12 | use Path::Tiny; | ||
13 | use File::stat; | 12 | use File::stat; |
14 | use feature 'signatures'; | 13 | use feature 'signatures'; |
15 | no warnings 'experimental::signatures'; | 14 | no warnings 'experimental::signatures'; |
@@ -85,10 +84,8 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) { | |||
85 | 84 | ||
86 | doit('install', '-d', $sv_dir); | 85 | doit('install', '-d', $sv_dir); |
87 | 86 | ||
88 | for my $line (path($runit)->lines) { | 87 | for my $words (filedoublearray($runit)) { |
89 | next if ($line =~ /^#/); # skip comments | 88 | (my $enable, my $path, my $name) = @{$words}; |
90 | next if ($line =~ /^\s*$/); # skip empty lines | ||
91 | (my $enable, my $path, my $name) = split /\s/, $line; | ||
92 | $name = $name || basename($path); | 89 | $name = $name || basename($path); |
93 | 90 | ||
94 | error("can't read `$path'") unless -r $path; | 91 | error("can't read `$path'") unless -r $path; |
@@ -110,3 +107,5 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) { | |||
110 | autoscript($pkg, 'prerm', 'prerm-runit', "s/#NAME#/$name/"); | 107 | autoscript($pkg, 'prerm', 'prerm-runit', "s/#NAME#/$name/"); |
111 | } | 108 | } |
112 | } | 109 | } |
110 | |||
111 | # PROMISE: DH NOOP WITHOUT runit | ||