Silvano,

Very nice indeed.

Here's a few changes:

 - uses the default /mnt/1-wire director
 - adds a few more sensor candidates (would be nice if a regex here could include 00-FF 
with third char as ".")
 - uses system command to create the link


#!/usr/bin/perl

use strict;
use warnings;
use File::Find;

my $owfs_root = "/mnt/1-wire";
my $owfs_flat = "/mnt/flat";

sub owfs_find_sensor {
    sub owfs_wanted
    {
        if ($File::Find::name =~ /alarm/) {return;};
        if ($File::Find::name =~ /bus/) {return;};
        if ($File::Find::name =~ /cached/) {return;};
        if ($File::Find::name =~ /structure/) {return;};
        if ($_ =~ /^(10|22|26|28|30)/) {
        {
            system "ln -s $File::Find::name $owfs_flat";
        }
    }
    eval {find(\&owfs_wanted, $owfs_root);};
}


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to