diff --git a/fhem/CHANGED b/fhem/CHANGED index 8480c7c9e..9d23f2a3c 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,7 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: 42_AptToDate: add new get command getDistribution to fetch + distribution info - change: 93_DbRep: attribute timeout set for minTimestamp - feature: 73_AutoShuttersControl: change hardLockOut mode code - bugfix: 73_AutoShuttersControl: bug line 623 diff --git a/fhem/FHEM/42_AptToDate.pm b/fhem/FHEM/42_AptToDate.pm index 78e1576f4..280edfd61 100644 --- a/fhem/FHEM/42_AptToDate.pm +++ b/fhem/FHEM/42_AptToDate.pm @@ -35,7 +35,7 @@ package main; use strict; use warnings; -my $version = "1.4.0"; +my $version = "1.4.1"; sub AptToDate_Initialize($) { @@ -67,7 +67,7 @@ use strict; use warnings; use POSIX; -use GPUtils qw(:all) +use GPUtils qw(GP_Import) ; # wird für den Import der FHEM Funktionen aus der fhem.pl benötigt use Data::Dumper; #only for Debugging @@ -362,10 +362,17 @@ sub Get($$@) { my $ret = CreateErrorList($hash); return $ret; + } + elsif ( $cmd eq 'getDistribution' ) { + return "usage: $cmd" if ( @args != 0 ); + $hash->{".fhem"}{aptget}{cmd} = 'getDistribution'; + AsynchronousExecuteAptGetCommand($hash); } else { my $list = ""; + $list .= " getDistribution:noArg" + unless ( ReadingsVal( $name, 'os-release_language', 'none' ) eq 'none' ); $list .= " showUpgradeList:noArg" if ( defined( $hash->{".fhem"}{aptget}{packages} ) and scalar keys %{ $hash->{".fhem"}{aptget}{packages} } > 0 ); @@ -1134,6 +1141,7 @@ sub ToDay() {