summaryrefslogtreecommitdiff
path: root/net/netatalk-devel/files/patch-macusers
diff options
context:
space:
mode:
Diffstat (limited to 'net/netatalk-devel/files/patch-macusers')
-rw-r--r--net/netatalk-devel/files/patch-macusers54
1 files changed, 0 insertions, 54 deletions
diff --git a/net/netatalk-devel/files/patch-macusers b/net/netatalk-devel/files/patch-macusers
deleted file mode 100644
index 763e5ec339af..000000000000
--- a/net/netatalk-devel/files/patch-macusers
+++ /dev/null
@@ -1,54 +0,0 @@
---- contrib/macusers/macusers.orig Wed Aug 29 12:20:32 2001
-+++ contrib/macusers/macusers Sun Jun 17 01:47:44 2001
-@@ -1,8 +1,8 @@
- #!/usr/bin/perl
--# $Id: macusers,v 1.4 2001/06/29 14:14:46 rufustfirefly Exp $
-
- use strict;
--use vars qw($MAC_PROCESS $PS_STR $MATCH_STR $ASIP_PORT $LSOF);
-+use Socket;
-+use vars qw($MAC_PROCESS $PS_STR $MATCH_STR $ASIP_PORT_NO $ASIP_PORT $LSOF);
-
- # Written for linux; may have to be modified for your brand of Unix.
-
-@@ -25,10 +25,11 @@
- $PS_STR = "-ef";
- $MATCH_STR = '\s*(\w+)\s+(\d+)\s+(\d+)\s+\d+\s+([\d\w:]+)';
- }
--$ASIP_PORT = "afpovertcp";
-+$ASIP_PORT = "afpovertcp";
-+$ASIP_PORT_NO = 548;
-
- # Change to 0 if you don't have lsof
--$LSOF = 1;
-+$LSOF = 0;
- my %mac = ();
-
- if ( $LSOF == 1 ) {
-@@ -43,8 +44,25 @@
- ($host) = ( $host =~ /(^[\w\d\-]+)/ );
- $mac{$pid} = $host;
- }
--
-+ print
-+"PID UID Username Name Logintime Mac\n";
- close(LSOF);
-+}
-+elsif ( $^O eq "freebsd" ) {
-+ open( SOCKSTAT, "sockstat -4 | grep $MAC_PROCESS | grep -v grep |" );
-+
-+ while (<SOCKSTAT>) {
-+ next if ( $_ !~ /$MAC_PROCESS/ );
-+ $_ =~
-+ /\S+\s+\S+\s+(\d+)\s+\d+\s+[\w\d]+\s+[\d\.:]+\s+([\d\.]+)/;
-+ my ( $pid, $addr, $host );
-+ $pid = $1;
-+ $addr = $2;
-+ $host =
-+ gethostbyaddr( pack( 'C4', split ( /\./, $addr ) ), AF_INET );
-+ ($host) = ( $host =~ /(^[\w\d\-]+)/ );
-+ $mac{$pid} = $host;
-+ }
- print
- "PID UID Username Name Logintime Mac\n";
- }