Sentry v1.02 Installation Problems

Started by Ron Wingfield, July 12, 2015, 12:19:38 PM

Previous topic - Next topic

Ron Wingfield

I'm trying to install sentry v1.02 into /usr/local/var/db/sentry.  The OS is FreeBSD 10.1-RELEASE and Perl v5.22.0.  I've downloaded, diff'ed it for local mods, set  my $root_dir  = '/usr/local/var/db/sentry'; and as simply instructed, run:
root@alpha:/usr/local/var/db/sentry # perl

I've had the previous version of Sentry running successfully (I was very pleased with the performance!), but I upgraded the Perl version to 5.22 (deleted all old versions) -- after that upgrade, sentry quit capturing and black-listing abusers.  For those of you reading this, Matt Simerson explained via eMail, that he has made some changes that involved path issues and now utilizes the /usr/bin/env utility  . . .which is why I'm attempting to install the latest version of sentry.

***   Edits   ***
Can anyone . . suggest what might (or might not) be in play here?   

Well . . .my post on the FreeBSD Forum, /usr/bin/env perl - Failure when invoked by hosts.allow spawn rule  describes what I have learned about the FreeBSD port of Perl 5.2+.  In fact, there is not a problem with Sentry, per se, but rather with the interaction of the /usr/bin/env utility and (I think) the spawned or execl'd process (i.e., parent forks, spawns child, parent forgets about child and continues, child does it's thing and dies.)   It's thing, of course, is invocation of the Perl script.

Problem is . . .I think, is that the env's path to ./perl is lost during the spawned fork.  And, as far as I can tell, the failed call just drops off into the ether . . .no complaint, no error message, no log entry . . .just solid gone.  Consequently, the script is never executed.

To resolve the problem (as least for now - I'm waiting on suggestions from the FreeBSD community) I had to hard-code the path to perl in the script to , i.e., #!/usr/local/bin/perl, rather than use #!/usr/bin/env perl.


I have since released sentry 1.03, which rewrites the shebang at install time, with the full path to whichever version of perl is running it when you install.