mirror of
https://github.com/smxi/inxi.git
synced 2025-01-18 16:37:49 +00:00
dm updates
This commit is contained in:
parent
9271f0130d
commit
f41d0da788
40
pinxi
40
pinxi
|
@ -50,8 +50,8 @@ use POSIX qw(ceil uname strftime ttyname);
|
|||
## INXI INFO ##
|
||||
my $self_name='pinxi';
|
||||
my $self_version='3.3.31';
|
||||
my $self_date='2023-12-16';
|
||||
my $self_patch='30';
|
||||
my $self_date='2023-12-19';
|
||||
my $self_patch='31';
|
||||
## END INXI INFO ##
|
||||
|
||||
my ($b_pledge,@pledges);
|
||||
|
@ -5967,7 +5967,7 @@ sub get_client_name {
|
|||
|
||||
sub get_client_version {
|
||||
eval $start if $b_log;
|
||||
my @app = ProgramData::data($client{'name'});
|
||||
my @app = ProgramData::values($client{'name'});
|
||||
my (@data,@working,$string);
|
||||
if (@app){
|
||||
$string = ($client{'name'} =~ /^gribble|limnoria|supybot$/) ? 'supybot' : $client{'name'};
|
||||
|
@ -30367,7 +30367,7 @@ sub set_gpart_data {
|
|||
}
|
||||
}
|
||||
|
||||
## DisplayManager
|
||||
## DisplayManagerData
|
||||
# Public method: get()
|
||||
# returns hash of array of arrays for dm/lm
|
||||
# hash: dm, lm
|
||||
|
@ -30375,7 +30375,7 @@ sub set_gpart_data {
|
|||
# 1: dm version
|
||||
# 2: dm status
|
||||
{
|
||||
package DisplayManager;
|
||||
package DisplayManagerData;
|
||||
my ($found,@glob);
|
||||
|
||||
sub get {
|
||||
|
@ -30394,6 +30394,7 @@ sub get {
|
|||
}
|
||||
|
||||
sub set_glob {
|
||||
eval $start if $b_log;
|
||||
my $pattern = '';
|
||||
if (-d '/run'){
|
||||
$pattern .= '/run';
|
||||
|
@ -30415,6 +30416,7 @@ sub set_glob {
|
|||
}
|
||||
print '@glob: ', Data::Dumper::Dumper \@glob if $dbg[60];
|
||||
main::log_data('dump','dm @glob:',\@glob) if $b_log;
|
||||
eval $end if $b_log;
|
||||
}
|
||||
|
||||
# args: 0: dm/lm, first test for dms, then if no dms, test for lms
|
||||
|
@ -31596,15 +31598,7 @@ sub get {
|
|||
($init,$init_version) = ProgramData::full('dinit');
|
||||
}
|
||||
elsif (-e '/sbin/openrc-init' && $link && $link =~ /openrc/){
|
||||
$init = 'OpenRc';
|
||||
# /sbin/openrc --version: openrc (OpenRC) 0.13
|
||||
if ($program = main::check_program('openrc')){
|
||||
($init,$init_version) = ProgramData::full('openrc',$program);
|
||||
}
|
||||
# /sbin/rc --version: rc (OpenRC) 0.11.8 (Gentoo Linux)
|
||||
elsif ($program = main::check_program('rc')){
|
||||
($init,$init_version) = ProgramData::full('rc',$program);
|
||||
}
|
||||
($init,$init_version) = openrc_data();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31660,6 +31654,22 @@ sub get {
|
|||
};
|
||||
}
|
||||
|
||||
sub openrc_data {
|
||||
eval $start if $b_log;
|
||||
my @result;
|
||||
# /sbin/openrc --version: openrc (OpenRC) 0.13
|
||||
if ($program = main::check_program('openrc')){
|
||||
@result = ProgramData::full('openrc',$program);
|
||||
}
|
||||
# /sbin/rc --version: rc (OpenRC) 0.11.8 (Gentoo Linux)
|
||||
elsif ($program = main::check_program('rc')){
|
||||
@result = ProgramData::full('rc',$program);
|
||||
}
|
||||
$result[0] ||= 'OpenRC';
|
||||
eval $end if $b_log;
|
||||
return @result;
|
||||
}
|
||||
|
||||
# Check? /var/run/nologin for bsds?
|
||||
sub get_runlevel {
|
||||
eval $start if $b_log;
|
||||
|
@ -36912,7 +36922,7 @@ sub system_item {
|
|||
if ($show{'host'}){
|
||||
$data->{$data_name}[$index]{main::key($num++,0,1,'Host')} = main::get_hostname();
|
||||
}
|
||||
my $dms = DisplayManager::get();
|
||||
my $dms = DisplayManagerData::get();
|
||||
my $dm_key = (!$dms->{'dm'} && $dms->{'lm'}) ? 'Login' : 'DM';
|
||||
my $kernel_data = main::get_kernel_data();
|
||||
$data->{$data_name}[$index]{main::key($num++,1,1,'Kernel')} = $kernel_data->[0];
|
||||
|
|
Loading…
Reference in a new issue