mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
PRESENCE: optimize logging for local-bluetooth mode (Forum: #34368)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@8191 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b57cca84d1
commit
b92bea50cb
@ -755,7 +755,7 @@ PRESENCE_DoLocalBluetoothScan($)
|
|||||||
{
|
{
|
||||||
my ($string) = @_;
|
my ($string) = @_;
|
||||||
my ($name, $device, $local) = split("\\|", $string);
|
my ($name, $device, $local) = split("\\|", $string);
|
||||||
my $hcitool = qx(which hcitool);
|
|
||||||
my $devname;
|
my $devname;
|
||||||
my $return;
|
my $return;
|
||||||
my $wait = 1;
|
my $wait = 1;
|
||||||
@ -764,16 +764,18 @@ PRESENCE_DoLocalBluetoothScan($)
|
|||||||
|
|
||||||
if(qx(ps --help 2>&1) =~ /BusyBox/g)
|
if(qx(ps --help 2>&1) =~ /BusyBox/g)
|
||||||
{
|
{
|
||||||
Log3 $name, 5, "PRESENCE ($name): found busybox variant of ps command, using \"w\" as parameter";
|
Log3 $name, 5, "PRESENCE ($name) - found busybox variant of ps command, using \"w\" as parameter";
|
||||||
$psargs = "w";
|
$psargs = "w";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Log3 $name, 5, "PRESENCE ($name): found standard variant of ps command, using \"ax\" as parameter";
|
Log3 $name, 5, "PRESENCE ($name) - found standard variant of ps command, using \"ax\" as parameter";
|
||||||
$psargs = "ax";
|
$psargs = "ax";
|
||||||
}
|
}
|
||||||
|
|
||||||
Log3 $name, 4, "PRESENCE ($name): 'which hcitool' returns: $hcitool";
|
Log3 $name, 4, "PRESENCE ($name) - executing: which hcitool";
|
||||||
|
my $hcitool = qx(which hcitool);
|
||||||
|
Log3 $name, 4, "PRESENCE ($name) - 'which hcitool' returns: $hcitool";
|
||||||
chomp $hcitool;
|
chomp $hcitool;
|
||||||
|
|
||||||
if(-x $hcitool)
|
if(-x $hcitool)
|
||||||
@ -793,6 +795,7 @@ PRESENCE_DoLocalBluetoothScan($)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log3 $name, 5, "PRESENCE ($name) - executing: hcitool name $device";
|
||||||
$devname = qx(hcitool name $device);
|
$devname = qx(hcitool name $device);
|
||||||
|
|
||||||
chomp($devname);
|
chomp($devname);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user