mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
more distro id/systembase upgrades.
This commit is contained in:
parent
2e8be3da88
commit
03ef90e615
16
pinxi
16
pinxi
|
@ -30953,7 +30953,7 @@ sub get_linux_distro {
|
||||||
$osr_good .= 'porteux|raspberry pi os|slint|zorin';
|
$osr_good .= 'porteux|raspberry pi os|slint|zorin';
|
||||||
# Force use of pretty name because that's only location of derived distro name
|
# Force use of pretty name because that's only location of derived distro name
|
||||||
# devuan should catch many devuans spins, which often put their names in pretty
|
# devuan should catch many devuans spins, which often put their names in pretty
|
||||||
my $osr_pretty = 'devuan|zinc';
|
my $osr_pretty = 'devuan|slackel|zinc';
|
||||||
my ($b_issue,$b_lsb,$b_osr_pretty,$b_skip_issue,$b_skip_osr);
|
my ($b_issue,$b_lsb,$b_osr_pretty,$b_skip_issue,$b_skip_osr);
|
||||||
my ($issue,$lsb_release) = ('/etc/issue','/etc/lsb-release');
|
my ($issue,$lsb_release) = ('/etc/issue','/etc/lsb-release');
|
||||||
# Note: OpenSuse Tumbleweed 2018-05 has made /etc/issue created by sym link to /run/issue
|
# Note: OpenSuse Tumbleweed 2018-05 has made /etc/issue created by sym link to /run/issue
|
||||||
|
@ -31004,6 +31004,7 @@ sub get_linux_distro {
|
||||||
}
|
}
|
||||||
elsif (grep {/($osr_pretty)/i} @osr){
|
elsif (grep {/($osr_pretty)/i} @osr){
|
||||||
$b_osr_pretty = 1;
|
$b_osr_pretty = 1;
|
||||||
|
$distro_file = $os_release;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (grep {/armbian/} @distro_files){
|
if (grep {/armbian/} @distro_files){
|
||||||
|
@ -31270,7 +31271,7 @@ sub system_base {
|
||||||
my $base_upstream_osr = '/etc/upstream-release/os-release';
|
my $base_upstream_osr = '/etc/upstream-release/os-release';
|
||||||
# These id as themselves, but system base is version file. Slackware mostly.
|
# These id as themselves, but system base is version file. Slackware mostly.
|
||||||
my %base_version = (
|
my %base_version = (
|
||||||
'porteux|salix|slint' => '/etc/slackware-version',
|
'porteux|salix|slackel|slint' => '/etc/slackware-version',
|
||||||
);
|
);
|
||||||
# First: try, some distros have upstream-release, elementary, new mint
|
# First: try, some distros have upstream-release, elementary, new mint
|
||||||
# and anyone else who uses this method for fallback ID
|
# and anyone else who uses this method for fallback ID
|
||||||
|
@ -31333,8 +31334,14 @@ sub system_base {
|
||||||
);
|
);
|
||||||
$system_base = $manual{$id};
|
$system_base = $manual{$id};
|
||||||
}
|
}
|
||||||
if (!$system_base && $distro && $distro =~ /^($base_distro_arch)/i){
|
if (!$system_base && $distro){
|
||||||
$system_base = 'Arch Linux';
|
if ($distro =~ /^($base_distro_arch)/i){
|
||||||
|
$system_base = 'Arch Linux';
|
||||||
|
}
|
||||||
|
elsif ($distro =~ /^peppermint/i){
|
||||||
|
my $type = (-f '/etc/devuan_version') ? 'devuan': 'debian';
|
||||||
|
$system_base = debian_id($type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!$system_base && $distro){
|
if (!$system_base && $distro){
|
||||||
foreach my $key (keys %base_version){
|
foreach my $key (keys %base_version){
|
||||||
|
@ -31535,6 +31542,7 @@ sub get_os_release {
|
||||||
elsif ($base_type eq 'debian' && $base_version){
|
elsif ($base_type eq 'debian' && $base_version){
|
||||||
$distro_osr = debian_id('debian',$base_version);
|
$distro_osr = debian_id('debian',$base_version);
|
||||||
}
|
}
|
||||||
|
# not used yet
|
||||||
elsif ($base_type eq 'devuan' && $base_version){
|
elsif ($base_type eq 'devuan' && $base_version){
|
||||||
$distro_osr = debian_id('devuan',$base_version);
|
$distro_osr = debian_id('devuan',$base_version);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue