mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
42_AptToDate: add dist-upgrade available with Attribut
git-svn-id: https://svn.fhem.de/fhem/trunk@16994 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
08899301d5
commit
e6a76ad823
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- feature: 42_AptToDate: add dist-upgrade available with Attribut
|
||||||
- change: 74_XiaomiBTLESens: more debug messages, delete old batteryreadings
|
- change: 74_XiaomiBTLESens: more debug messages, delete old batteryreadings
|
||||||
- change: 83_IOhomecontrol, 84_IOhomecontrolDevice: complete rewrite and
|
- change: 83_IOhomecontrol, 84_IOhomecontrolDevice: complete rewrite and
|
||||||
extended features
|
extended features
|
||||||
|
@ -49,7 +49,7 @@ eval "use JSON;1" or $missingModul .= "JSON ";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $version = "0.2.4";
|
my $version = "1.0.0";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -103,6 +103,7 @@ sub AptToDate_Initialize($) {
|
|||||||
$hash->{AttrList} = "disable:1 ".
|
$hash->{AttrList} = "disable:1 ".
|
||||||
"disabledForIntervals ".
|
"disabledForIntervals ".
|
||||||
"upgradeListReading:1 ".
|
"upgradeListReading:1 ".
|
||||||
|
"distupgrade:1 ".
|
||||||
$readingFnAttributes;
|
$readingFnAttributes;
|
||||||
|
|
||||||
|
|
||||||
@ -368,6 +369,7 @@ sub AptToDate_AsynchronousExecuteAptGetCommand($) {
|
|||||||
$subprocess->{aptget} = $hash->{".fhem"}{aptget};
|
$subprocess->{aptget} = $hash->{".fhem"}{aptget};
|
||||||
$subprocess->{aptget}{host} = $hash->{HOST};
|
$subprocess->{aptget}{host} = $hash->{HOST};
|
||||||
$subprocess->{aptget}{debug} = ( AttrVal($name,'verbose',0) > 3 ? 1 : 0 );
|
$subprocess->{aptget}{debug} = ( AttrVal($name,'verbose',0) > 3 ? 1 : 0 );
|
||||||
|
$subprocess->{aptget}{distupgrade} = ( AttrVal($name,'distupgrade',0) == 1 ? 1 : 0 );
|
||||||
my $pid = $subprocess->run();
|
my $pid = $subprocess->run();
|
||||||
|
|
||||||
readingsSingleUpdate($hash,'state',$hash->{".fhem"}{aptget}{cmd}.' in progress', 1);
|
readingsSingleUpdate($hash,'state',$hash->{".fhem"}{aptget}{cmd}.' in progress', 1);
|
||||||
@ -447,7 +449,8 @@ sub AptToDate_ExecuteAptGetCommand($) {
|
|||||||
$apt->{distri} = 'ssh '.$aptget->{host}.' cat /etc/os-release |';
|
$apt->{distri} = 'ssh '.$aptget->{host}.' cat /etc/os-release |';
|
||||||
$apt->{'locale'} = 'ssh '.$aptget->{host}.' locale';
|
$apt->{'locale'} = 'ssh '.$aptget->{host}.' locale';
|
||||||
$apt->{aptgetupgrade} = 'ssh '.$aptget->{host}.' \'echo n | sudo apt-get -s -q -V upgrade\'';
|
$apt->{aptgetupgrade} = 'ssh '.$aptget->{host}.' \'echo n | sudo apt-get -s -q -V upgrade\'';
|
||||||
$apt->{aptgettoupgrade} = 'ssh '.$aptget->{host}.' \'echo n | sudo apt-get -y -q -V upgrade\'';
|
$apt->{aptgettoupgrade} = 'ssh '.$aptget->{host}.' \'echo n | sudo apt-get -y -q -V upgrade\'' if($aptget->{distupgrade} == 0);
|
||||||
|
$apt->{aptgettoupgrade} = 'ssh '.$aptget->{host}.' \'echo n | sudo apt-get -y -q -V dist-upgrade\'' if($aptget->{distupgrade} == 1);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -455,7 +458,8 @@ sub AptToDate_ExecuteAptGetCommand($) {
|
|||||||
$apt->{distri} = '</etc/os-release';
|
$apt->{distri} = '</etc/os-release';
|
||||||
$apt->{'locale'} = 'locale';
|
$apt->{'locale'} = 'locale';
|
||||||
$apt->{aptgetupgrade} = 'echo n | sudo apt-get -s -q -V upgrade';
|
$apt->{aptgetupgrade} = 'echo n | sudo apt-get -s -q -V upgrade';
|
||||||
$apt->{aptgettoupgrade} = 'echo n | sudo apt-get -y -q -V upgrade';
|
$apt->{aptgettoupgrade} = 'echo n | sudo apt-get -y -q -V upgrade' if($aptget->{distupgrade} == 0);
|
||||||
|
$apt->{aptgettoupgrade} = 'echo n | sudo apt-get -y -q -V dist-upgrade' if($aptget->{distupgrade} == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $response;
|
my $response;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user