version 1.76, 2000/12/06 19:58:31
|
version 1.77, 2000/12/06 20:32:52
|
Line 90 use Apache::File;
|
Line 90 use Apache::File;
|
use LWP::UserAgent(); |
use LWP::UserAgent(); |
use HTTP::Headers; |
use HTTP::Headers; |
use vars |
use vars |
qw(%perlvar %hostname %homecache %spareid %hostdom %libserv %pr %prp %fe %fd $readit %metacache $unique); |
qw(%perlvar %hostname %homecache %spareid %hostdom %libserv %pr %prp %fe %fd $readit %metacache); |
use IO::Socket; |
use IO::Socket; |
use GDBM_File; |
use GDBM_File; |
use Apache::Constants qw(:common :http); |
use Apache::Constants qw(:common :http); |
Line 1639 sub ireceipt {
|
Line 1639 sub ireceipt {
|
my $cudom=unpack("%32C*",$fudom); |
my $cudom=unpack("%32C*",$fudom); |
my $cucourseid=unpack("%32C*",$fucourseid); |
my $cucourseid=unpack("%32C*",$fucourseid); |
my $cusymb=unpack("%32C*",$fusymb); |
my $cusymb=unpack("%32C*",$fusymb); |
my $cunique=unpack("%32C*",$unique); |
my $cunique=unpack("%32C*",$perlvar{'lonReceipt'}); |
return unpack("%32C*",$perlvar{'lonHostID'}).'-'. |
return unpack("%32C*",$perlvar{'lonHostID'}).'-'. |
($cunique%$cuname+ |
($cunique%$cuname+ |
$cunique%$cudom+ |
$cunique%$cudom+ |
Line 1800 if ($readit ne 'done') {
|
Line 1800 if ($readit ne 'done') {
|
} |
} |
} |
} |
|
|
# --------------------------------------------------- Get CPU data as unique ID |
|
{ |
|
my @contents; |
|
{ |
|
my $fh=Apache::File->new('/proc/cpuinfo'); |
|
@contents=<$fh>; |
|
} |
|
$unique=''; |
|
map { |
|
my ($name,$value)=split(/\s*\:\s*/,$_); |
|
if (($name eq 'vendor_id') || ($name=~/^model/) || |
|
($name=~/^cpu/) || ($name eq 'stepping')) { |
|
$unique.=$value; |
|
} |
|
} @contents; |
|
$unique=~s/\W//g; |
|
} |
|
|
|
%metacache=(); |
%metacache=(); |
|
|
$readit='done'; |
$readit='done'; |