bugfix wezzy Distrie
This commit is contained in:
parent
2a953df85d
commit
f2f6eefe9c
@ -49,7 +49,7 @@ eval "use JSON;1" or $missingModul .= "JSON ";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $version = "0.0.62";
|
my $version = "0.0.64";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -457,6 +457,7 @@ sub AptToDate_GetDistribution() {
|
|||||||
|
|
||||||
if(open(DISTRI, "</etc/os-release")) {
|
if(open(DISTRI, "</etc/os-release")) {
|
||||||
while (my $line = <DISTRI>) {
|
while (my $line = <DISTRI>) {
|
||||||
|
|
||||||
chomp($line);
|
chomp($line);
|
||||||
Log3 'AptToDate', 4, "Sub AptToDate_GetDistribution - $line";
|
Log3 'AptToDate', 4, "Sub AptToDate_GetDistribution - $line";
|
||||||
if($line =~ m#^(.*)="?(.*)"$#i or $line =~ m#^(.*)=([a-z]+)$#i) {
|
if($line =~ m#^(.*)="?(.*)"$#i or $line =~ m#^(.*)=([a-z]+)$#i) {
|
||||||
@ -465,15 +466,15 @@ sub AptToDate_GetDistribution() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
close(APT);
|
close(DISTRI);
|
||||||
} else {
|
} else {
|
||||||
die Log3 'Update', 2, "Couldn't use APT: $!";
|
die Log3 'Update', 2, "Couldn't use DISTRI: $!";
|
||||||
#die "Couldn't use APT: $!\n";
|
#die "Couldn't use DISTRI: $!\n";
|
||||||
$update->{error} = 'Couldn\'t use APT: '.$;
|
$update->{error} = 'Couldn\'t use DISTRI: '.$;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(open(APT, "echo n | locale 2>&1 |")) {
|
if(open(LOCALE, "locale 2>&1 |")) {
|
||||||
while(my $line = <APT>) {
|
while(my $line = <LOCALE>) {
|
||||||
|
|
||||||
chomp($line);
|
chomp($line);
|
||||||
Log3 'AptToDate', 4, "Sub AptToDate_GetDistribution - $line";
|
Log3 'AptToDate', 4, "Sub AptToDate_GetDistribution - $line";
|
||||||
@ -483,11 +484,11 @@ sub AptToDate_GetDistribution() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
close(APT);
|
close(LOCALE);
|
||||||
} else {
|
} else {
|
||||||
die Log3 'Update', 2, "Couldn't use APT: $!";
|
die Log3 'Update', 2, "Couldn't use LOCALE: $!";
|
||||||
#die "Couldn't use APT: $!\n";
|
#die "Couldn't use APT: $!\n";
|
||||||
$update->{error} = 'Couldn\'t use APT: '.$;
|
$update->{error} = 'Couldn\'t use LOCALE: '.$;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $update;
|
return $update;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user