mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
Fix for convert-ip-db script and additional message
PR: 42402 Submitted by: Amar Takhar <verm@drunkmonk.net> (maintainer)
This commit is contained in:
parent
982af3464d
commit
06242fa2c6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=72754
4 changed files with 80 additions and 0 deletions
|
@ -32,4 +32,10 @@ MAN1= dns-terror.1 btree-dump.1 convert-dom-db.1 convert-ip-db.1 \
|
||||||
pre-configure:
|
pre-configure:
|
||||||
@(cd ${WRKSRC} && aclocal14)
|
@(cd ${WRKSRC} && aclocal14)
|
||||||
|
|
||||||
|
post-install:
|
||||||
|
@${ECHO_MSG} ""
|
||||||
|
@${ECHO_MSG} "If you want to use the convert-ip-db script you must"
|
||||||
|
@${ECHO_MSG} "install the databases/p5-BerkeleyDB port"
|
||||||
|
@${ECHO_MSG} ""
|
||||||
|
|
||||||
.include <bsd.port.post.mk>
|
.include <bsd.port.post.mk>
|
||||||
|
|
34
dns/fastresolve/files/patch-scripts::convert-ip-db-in
Normal file
34
dns/fastresolve/files/patch-scripts::convert-ip-db-in
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
--- scripts/convert-ip-db.in.orig Wed Sep 29 12:13:42 1999
|
||||||
|
+++ scripts/convert-ip-db.in Wed Sep 4 02:31:43 2002
|
||||||
|
@@ -13,6 +13,7 @@
|
||||||
|
# Written by Chris Ross <cross@eng.us.uu.net>
|
||||||
|
# and David MacKenzie <djm@web.us.uu.net>
|
||||||
|
# Please send comments and bug reports to fastresolve-bugs@web.us.uu.net.
|
||||||
|
+# Updated to use BerkeleyDB (db3) by Harold Paulson <haroldp@internal.org>
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Copyright 1999 UUNET, an MCI WorldCom company.
|
||||||
|
@@ -33,8 +34,7 @@
|
||||||
|
# 02111-1307, USA.
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
-use DB_File;
|
||||||
|
-use Fcntl;
|
||||||
|
+use BerkeleyDB;
|
||||||
|
|
||||||
|
main();
|
||||||
|
exit(0);
|
||||||
|
@@ -45,8 +45,11 @@
|
||||||
|
|
||||||
|
$dbfile = shift @ARGV || "ip2host.db";
|
||||||
|
|
||||||
|
- tie(%input, "DB_File", $dbfile, O_RDONLY, 0640, $DB_BTREE)
|
||||||
|
- || die "$0: Can't read $dbfile: $!\n";
|
||||||
|
+ tie(%input, 'BerkeleyDB::Btree',
|
||||||
|
+ -Filename => $dbfile,
|
||||||
|
+ -Flags => DB_RDONLY,
|
||||||
|
+ -Mode => 0640)
|
||||||
|
+ || die "$0: Can't read $dbfile: $!\n";
|
||||||
|
|
||||||
|
while (($ipaddr, $domain) = each(%input)) {
|
||||||
|
($timestamp, $domain) = unpack("IA*", $domain);
|
|
@ -32,4 +32,10 @@ MAN1= dns-terror.1 btree-dump.1 convert-dom-db.1 convert-ip-db.1 \
|
||||||
pre-configure:
|
pre-configure:
|
||||||
@(cd ${WRKSRC} && aclocal14)
|
@(cd ${WRKSRC} && aclocal14)
|
||||||
|
|
||||||
|
post-install:
|
||||||
|
@${ECHO_MSG} ""
|
||||||
|
@${ECHO_MSG} "If you want to use the convert-ip-db script you must"
|
||||||
|
@${ECHO_MSG} "install the databases/p5-BerkeleyDB port"
|
||||||
|
@${ECHO_MSG} ""
|
||||||
|
|
||||||
.include <bsd.port.post.mk>
|
.include <bsd.port.post.mk>
|
||||||
|
|
34
sysutils/fastresolve/files/patch-scripts::convert-ip-db-in
Normal file
34
sysutils/fastresolve/files/patch-scripts::convert-ip-db-in
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
--- scripts/convert-ip-db.in.orig Wed Sep 29 12:13:42 1999
|
||||||
|
+++ scripts/convert-ip-db.in Wed Sep 4 02:31:43 2002
|
||||||
|
@@ -13,6 +13,7 @@
|
||||||
|
# Written by Chris Ross <cross@eng.us.uu.net>
|
||||||
|
# and David MacKenzie <djm@web.us.uu.net>
|
||||||
|
# Please send comments and bug reports to fastresolve-bugs@web.us.uu.net.
|
||||||
|
+# Updated to use BerkeleyDB (db3) by Harold Paulson <haroldp@internal.org>
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Copyright 1999 UUNET, an MCI WorldCom company.
|
||||||
|
@@ -33,8 +34,7 @@
|
||||||
|
# 02111-1307, USA.
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
-use DB_File;
|
||||||
|
-use Fcntl;
|
||||||
|
+use BerkeleyDB;
|
||||||
|
|
||||||
|
main();
|
||||||
|
exit(0);
|
||||||
|
@@ -45,8 +45,11 @@
|
||||||
|
|
||||||
|
$dbfile = shift @ARGV || "ip2host.db";
|
||||||
|
|
||||||
|
- tie(%input, "DB_File", $dbfile, O_RDONLY, 0640, $DB_BTREE)
|
||||||
|
- || die "$0: Can't read $dbfile: $!\n";
|
||||||
|
+ tie(%input, 'BerkeleyDB::Btree',
|
||||||
|
+ -Filename => $dbfile,
|
||||||
|
+ -Flags => DB_RDONLY,
|
||||||
|
+ -Mode => 0640)
|
||||||
|
+ || die "$0: Can't read $dbfile: $!\n";
|
||||||
|
|
||||||
|
while (($ipaddr, $domain) = each(%input)) {
|
||||||
|
($timestamp, $domain) = unpack("IA*", $domain);
|
Loading…
Add table
Reference in a new issue