- Add missing pwdump tool
- Fix timeout in updater script - Silence warnings in updater script - Fix periodic script - Fix default directory permissions - Bump PORTREVISION
This commit is contained in:
parent
abfeacaa87
commit
16469b1d7c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=384496
6 changed files with 50 additions and 8 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
PORTNAME= pwhois
|
||||
PORTVERSION= 2.2.0.1
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= http://pwhois.org/get/ \
|
||||
http://mirrors.rit.edu/zi/
|
||||
|
@ -51,12 +51,14 @@ do-install:
|
|||
@${INSTALL_SCRIPT} ${WRKDIR}/512.pwhois-updatedb \
|
||||
${STAGEDIR}${PREFIX}/etc/periodic/daily/
|
||||
@${INSTALL_PROGRAM} ${WRKSRC}/pwhoisd ${STAGEDIR}${PREFIX}/sbin/
|
||||
@${INSTALL_PROGRAM} ${WRKSRC}/pwhois-pwdump ${STAGEDIR}${PREFIX}/bin/
|
||||
@${INSTALL_SCRIPT} ${WRKSRC}/pwhois-updatedb ${STAGEDIR}${PREFIX}/sbin/
|
||||
@${INSTALL_DATA} ${WRKSRC}/pwhoisd.conf \
|
||||
${STAGEDIR}${ETCDIR}/pwhoisd.conf.sample
|
||||
@${INSTALL_DATA} ${WRKSRC}/mysql/createdb.sql ${STAGEDIR}${DATADIR}/
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${STAGEDIR}/var/db/pwhois ${STAGEDIR}/var/log/pwhois
|
||||
@${INSTALL} -d -o 512 -g 512 ${STAGEDIR}/var/db/pwhois
|
||||
@${INSTALL} -d -o 512 -g 512 ${STAGEDIR}/var/log/pwhois
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -10,11 +10,12 @@ fi
|
|||
|
||||
rc=0
|
||||
|
||||
case "${daily_pwhois-updatedb_enable:-YES}" in
|
||||
case "${daily_pwhois_updatedb_enable:-YES}" in
|
||||
[Nn][Oo])
|
||||
;;
|
||||
*)
|
||||
[ -x %%PREFIX%%/sbin/pwhois-updatedb ] && %%PREFIX%%/sbin/pwhois-updatedb 1>/dev/null
|
||||
[Yy][Ee][Ss])
|
||||
rm /tmp/.pwhois-updatedb.LCK
|
||||
su -fm pwhois -c 'lockf -t0 /tmp/.pwhois-updatedb.lock %%PREFIX%%/sbin/pwhois-updatedb' 1>/dev/null
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
38
net/pwhois/files/patch-pwhois-updatedb
Normal file
38
net/pwhois/files/patch-pwhois-updatedb
Normal file
|
@ -0,0 +1,38 @@
|
|||
--- pwhois-updatedb.orig 2013-10-08 18:59:42 UTC
|
||||
+++ pwhois-updatedb
|
||||
@@ -975,7 +975,7 @@ sub connect
|
||||
my $passwd = shift;
|
||||
|
||||
|
||||
- my $session = Net::Telnet->new(timeout => 10,
|
||||
+ my $session = Net::Telnet->new(timeout => 300,
|
||||
telnetmode=>0,
|
||||
cmd_remove_mode => 1
|
||||
);
|
||||
@@ -3133,7 +3133,7 @@ sub readMRTdump
|
||||
|
||||
@st = stat($fd);
|
||||
|
||||
- if(!defined(@st))
|
||||
+ if(!@st)
|
||||
{
|
||||
$errcode = -2;
|
||||
}
|
||||
@@ -3763,7 +3763,7 @@ sub parseOrganisationObject
|
||||
|
||||
#printMap(%obj);
|
||||
|
||||
- return -$numlines if(!(defined($orgId) && defined($orgName) && defined(@addrs)));
|
||||
+ return -$numlines if(!(defined($orgId) && defined($orgName) && (@addrs)));
|
||||
|
||||
$country = "" if(!defined($country));
|
||||
$country = substr(normalizeValue($country), 0, $fields_length{'organization.country'});
|
||||
@@ -4035,7 +4035,7 @@ sub parsePersonObject
|
||||
#printMap(%obj);
|
||||
|
||||
$source = 0 if(!defined($source));
|
||||
- return -$numlines if(!(defined($person) && defined(@addrs) && defined($officePhone) &&
|
||||
+ return -$numlines if(!(defined($person) && (@addrs) && defined($officePhone) &&
|
||||
defined($mailbox) && defined($pocHandle) && defined($source)));
|
||||
|
||||
for($j1 = 0; $j1 < 6; $j1++){
|
|
@ -21,4 +21,4 @@ pwhoisd_enable="YES"
|
|||
service pwhoisd start
|
||||
|
||||
6. To enable daily updates, edit /etc/periodic.conf and add:
|
||||
daily_pwhois-updatedb_enable="YES"
|
||||
daily_pwhois_updatedb_enable="YES"
|
||||
|
|
|
@ -33,8 +33,8 @@ stop_postcmd=pwhoisd_cleanup
|
|||
pwhoisd_precmd()
|
||||
{
|
||||
[ ! -f $pidfile ] && %%TOUCH%% $pidfile && %%CHOWN%% %%USER%%:%%GROUP%% $pidfile
|
||||
[ ! -d $_dbdir ] && %%INSTALL%% -d -o %%USER%% -g %%GROUP%% $_dbdir
|
||||
[ ! -d $_logdir ] && %%INSTALL%% -d -o %%USER%% -g %%GROUP%% $_logdir
|
||||
%%INSTALL%% -d -o %%USER%% -g %%GROUP%% $_dbdir
|
||||
%%INSTALL%% -d -o %%USER%% -g %%GROUP%% $_logdir
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
bin/pwhois-pwdump
|
||||
etc/periodic/daily/512.pwhois-updatedb
|
||||
sbin/pwhois-updatedb
|
||||
sbin/pwhoisd
|
||||
|
|
Loading…
Reference in a new issue