[prev in list] [next in list] [prev in thread] [next in thread] 

List:       owfs-developers
Subject:    Re: [Owfs-developers] Website issues
From:       Mark Richards <mark.richards () massmicro ! com>
Date:       2011-10-13 21:28:34
Message-ID: 4E975802.3030301 () massmicro ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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);};
}


[Attachment #5 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#333399" bgcolor="#FFFFFF">
    <pre>Silvano,</pre>
    <pre>
Very nice indeed.</pre>
    <pre>
Here's a few changes:</pre>
    <pre>&nbsp;- 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
</pre>
    <br>
    <pre>#!/usr/bin/perl</pre>
    <pre>use strict;
use warnings;
use File::Find;

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

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



------------------------------------------------------------------------------
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
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic