[Ukfreebsd] Question about linprocfs

andy thomas andy at time-domain.co.uk
Fri May 27 18:27:33 BST 2011


On Fri, 27 May 2011, Mark Blackman wrote:

>
> On 27 May 2011, at 16:05, andy thomas wrote:
>
>> I'm trying to get the Linux binary of the Magma computational algebra software package running on amd64 FreeBSD 8.2. When this binary is executed on a Linux system, it reads /proc/net/dev to determine the system's MAC address and compares this with an encrypted license file to decided whether or not the system is licenced to run the software.
>
> [snip]
>
>>
>> Can anyone think of a reason for this? It ought to look something like this (from a Debian Squeeze system):
>>
>> andy at tornado:~$ cat /proc/net/dev
>> Inter-|   Receive                                                | Transmit
>> face |bytes    packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
>>    lo:79938338  564655    0    0    0     0          0         0 79938338 564655    0    0    0     0       0          0
>>  eth0:4743228657 6582199    0    0    0     0          0    224017 558374203 2678846    0    0    0     0       0          0
>>  pan0:       0       0    0    0    0     0          0         0        0 0    0    0    0     0       0          0
>>
>
> I don't see a MAC address there.

You're right and I can't explain that! If I unmount linprocfs, then on 
trying the Magma executable I get:

 	andy at dell380:~ $ /usr/local/magma/magma.exe
 	Magma: Fatal Error: Couldn't open /proc/net/dev for mac address startup

If I remount it, I get:

 	andy at dell380:~ $ /usr/local/magma/magma.exe
 	Magma: Fatal Error: Couldn't get MAC address

The strange thing is this software runs fine on Linux even though I can't 
see any MAC addresses in /proc/net/dev.

> However, I'd be tempted to fake it out and create a file with the contents it
> expects at that location (as you presumably don't linprocfs for anything else)

I've tried that too and it doesn't work. I think I'll get in touch with 
the vendors - they support AIX, Solaris, Windows, MacOS and even 
Digital/Tru64 but not FreeBSD. Maybe they have an undocumented envvar that 
can be set with the MAC address at run time.

Andy


More information about the Ukfreebsd mailing list