mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
a few bug fixes for distro base: detections
This commit is contained in:
parent
2830c98935
commit
2d1585cdc1
12
inxi
12
inxi
|
@ -15447,7 +15447,7 @@ sub get_bsd_os {
|
|||
sub get_linux_distro {
|
||||
eval $start if $b_log;
|
||||
my ($distro,$distro_file,$system_base) = ('','','');
|
||||
my ($b_antergos,$b_armbian,$b_base_default,$b_mint,$b_osr,$b_raspbian,@working);
|
||||
my ($b_antergos,$b_armbian,$b_mint,$b_osr,$b_raspbian,@working);
|
||||
my @derived = qw(antix-version aptosid-version kanotix-version knoppix-version
|
||||
mandrake-release manjaro-release mx-version pardus-release porteus-version sabayon-release
|
||||
siduction-version sidux-version slitaz-release solusos-release turbolinux-release
|
||||
|
@ -15501,7 +15501,6 @@ sub get_linux_distro {
|
|||
# $system_base = 'Arch Linux';
|
||||
}
|
||||
$b_armbian = 1 if grep {/armbian/} @distro_files;
|
||||
$b_base_default = 1 if grep {/\/etc\/($base_default_s)/} @distro_files;
|
||||
my $distro_files_s = join "|", @distro_files;
|
||||
@working = (@derived,@primary);
|
||||
foreach my $file (@working){
|
||||
|
@ -15613,8 +15612,13 @@ sub get_linux_distro {
|
|||
$distro = $distro_file;
|
||||
}
|
||||
}
|
||||
if ($extra > 2){
|
||||
if ($extra > 0){
|
||||
if (@osr){
|
||||
my ($b_base_default);
|
||||
# more tests added here for other ubuntu derived distros
|
||||
if ( @distro_files && (grep {/\/etc\/($base_default_s)/} @distro_files) ){
|
||||
$b_base_default = 1;
|
||||
}
|
||||
if ($b_base_default ){
|
||||
$system_base = get_os_release('default');
|
||||
}
|
||||
|
@ -15669,7 +15673,7 @@ sub get_lsb_release {
|
|||
}
|
||||
else {
|
||||
$distro = "$id $release $codename";
|
||||
$distro =~ s/^\s+|\s\s+|\s+$//g; # get rid of double and trailling spaces
|
||||
$distro =~ s/^\s+|\s\s+|\s+$//g; # get rid of double and trailing spaces
|
||||
}
|
||||
eval $end if $b_log;
|
||||
return $distro;
|
||||
|
|
Loading…
Reference in a new issue