pkgsrc/sysutils/p5-Unburden-Home-Dir/patches/patch-bin_unburden-home-dir
hauke 0c8e056b15 Update sysutils-p5-Unburden-Home-Dir to v0.41
Changes mostly cosmetic, see
<https://github.com/xtaran/unburden-home-dir/releases>.

ruby-ronn has moved to pkgsrc proper, adapt man page generation.
2018-04-30 09:45:13 +00:00

51 lines
1.6 KiB
Text

$NetBSD: patch-bin_unburden-home-dir,v 1.4 2018/04/30 09:45:13 hauke Exp $
We depend on sysutils/lsof, so we do not need to hunt for it
Rename the config file, sticking to conventions
--- bin/unburden-home-dir.orig 2017-11-05 23:48:51.000000000 +0000
+++ bin/unburden-home-dir
@@ -90,7 +90,7 @@ my %OPTIONS = ();
my $FILTER = undef;
my $UID = getpwuid($<);
my $USE_LSOF = 1;
-my $LSOF_CMD = undef;
+my $LSOF_CMD = '@PREFIX@/sbin/lsof';
# Some messages for Getopt::Std
sub VERSION_MESSAGE {
@@ -156,10 +156,10 @@ foreach my $key (keys %OPTIONS) {
}
# By default check for a system wide and a user configuration and list file
-my @CONFFILES = ("/etc/$BASENAME",
- "$ENV{HOME}/.$BASENAME",
+my @CONFFILES = ("@PKG_SYSCONFDIR@/$BASENAME.conf",
+ "$ENV{HOME}/.$BASENAME.conf",
config_home($BASENAME).'/config');
-my @LISTFILES = ("/etc/$BASENAME.$LISTSUFFIX",
+my @LISTFILES = ("@PKG_SYSCONFDIR@/$BASENAME.$LISTSUFFIX",
"$ENV{HOME}/.$BASENAME.$LISTSUFFIX",
config_home($BASENAME)."/$LISTSUFFIX");
@@ -225,20 +225,6 @@ my $rsync = File::Rsync->new(
},
);
-# Check for lsof in search path
-my $which_lsof = which('lsof');
-# Extra check for crappy distributions which place lsof outside a
-# user's $PATH. Fixes GH#8.
-if (not($which_lsof) and -x '/usr/sbin/lsof') {
- $which_lsof = '/usr/sbin/lsof';
-}
-if (!$which_lsof) {
- warn "WARNING: lsof not found, not checking for files in use.\n";
- $USE_LSOF = 0;
-} else {
- $LSOF_CMD = $which_lsof;
-}
-
# Standard Error reporting function; Warning
sub report_problem {
warn "WARNING: Can't handle $_[0]: $_[1]";