FHEM Forum

FHEM => Sonstiges => Thema gestartet von: otdftr am 24 Mai 2020, 11:58:52

Titel: Anregung zu FHEM/98_ping.pm - Mode SYN unterstützen
Beitrag von: otdftr am 24 Mai 2020, 11:58:52
Vorschlag (weil es mir schon mehrfach geholfen hat, aber nach jedem Update neu zu patchen ist): Im Modul 98_ping auch SYN mode von Net::Ping zuzulassen, der in bestimmten Situationen hilfreich ist // suggesting to allow Net::Ping's syn mode in  FHEM/98_ping.pm which is very helpful in certain situations.

Wollte aber für die 3 Buchstaben nicht mit einem kompletten Entwickleraccount starten, deshalb Patch nachfolgend, vielleicht mag @mattwire / ein Maintainer den einbauen?

# diff -U 3 98_ping.pm 98_ping_ORIGINAL.pm
--- 98_ping.pm   2020-05-24 07:58:12.000000000 +0200
+++ 98_ping_ORIGINAL.pm   2020-05-24 08:37:22.000000000 +0200
@@ -63,7 +63,7 @@

   readingsSingleUpdate($hash, "state", "Initialized", 1);

-  return "ERROR: mode must be one of tcp,udp,icmp,syn" if ($hash->{MODE} !~ "tcp|udp|icmp|syn");
+  return "ERROR: mode must be one of tcp,udp,icmp" if ($hash->{MODE} !~ "tcp|udp|icmp");
   return "ERROR: timeout must be 0 or higher." if (($hash->{TIMEOUT} !~ /^\d*$/) || ($hash->{TIMEOUT} < 0));

   $attr{$name}{"checkInterval"} = 10 if (!defined($attr{$name}{"checkInterval"}));
@@ -225,7 +225,7 @@
     <p>Specifies the ping device.<br/>
        &lt;host/ip&gt; is the hostname or IP address of the Bridge.</p>
     <p>Specifies ping mode.<br/>
-       &lt;mode&gt; One of: tcp|udp|icmp|syn.  Read the perl docs for more detail: http://perldoc.perl.org/Net/Ping.html</p>
+       &lt;mode&gt; One of: tcp|udp|icmp.  Read the perl docs for more detail: http://perldoc.perl.org/Net/Ping.html</p>
     <p>Timeout.<br/>
        &lt;timeout&gt; is the maximum time to wait for each ping.</p>
   </ul>
Titel: Antw:Anregung zu FHEM/98_ping.pm - Mode SYN unterstützen
Beitrag von: nils_ am 25 Mai 2020, 17:56:41
hallo otdftr,

also mattwire war schon ewig nicht mehr hier online --> https://forum.fhem.de/index.php?action=profile;u=8783
ZitatLetzter Besuch: 14 Februar 2018, 11:35:03

um dir das patchen nach dem update zu sparen kannst du auch exclude_from_update  ( https://commandref.fhem.de/#update ) verwenden.
Titel: Antw:Anregung zu FHEM/98_ping.pm - Mode SYN unterstützen
Beitrag von: otdftr am 26 Mai 2020, 13:09:00
> mattwire war schon ewig nicht mehr hier online
war mal ein versuch...

danke für den tipp mit
attr global exclude_from_update 98_ping.pm
- das hilft!