From 145adc0ad85434e92eaf3180dbda80c57e1417dc Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Sun, 14 Aug 2016 08:59:18 +0300 Subject: Fix attempt to create directory under / --- dh_runit | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'dh_runit') diff --git a/dh_runit b/dh_runit index 6ec66c8..53f3f88 100755 --- a/dh_runit +++ b/dh_runit @@ -81,16 +81,14 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) { runit_autoscript($pkg, 'postrm', "s/#NAME#/$name/"); if ($conf->{logscript}) { my $logdir = $conf->{logdir} || "/var/log/runit/$name"; - $logdir = "$tmp/$logdir"; install_dir("$sv_dir/$name/log"); - install_dir($logdir); + install_dir($tmp . $logdir); my $run_log = "$sv_dir/$name/log/run"; my $log_user = $name . "log_"; open(RUN_LOG, ">$run_log") || die $!; print RUN_LOG "#!/bin/sh\n"; - print RUN_LOG "mkdir -p '$logdir'\n"; print RUN_LOG "chown -R '$log_user' '$logdir'\n"; print RUN_LOG "exec chpst -u '$log_user' svlogd -tt '$logdir'\n"; close(RUN_LOG); -- cgit v1.2.3