New Version, new tarball.

Fixed bugs in Epoch init system detection, caused false positives in systems booted on
SysVinit, but with Epoch installed. Epoch turns out to be in PID 1 == epoch (/proc/1/comm)
so that's easy to fix.

Also fixed spacing isxue with OpenRC output in -I line.
This commit is contained in:
inxi-svn 2015-01-14 20:41:55 +00:00
parent 358988f801
commit 2a277e09bf
2 changed files with 24 additions and 10 deletions

16
inxi
View file

@ -1,8 +1,8 @@
#!/usr/bin/env bash
########################################################################
#### Script Name: inxi
#### Version: 2.2.16
#### Date: 2014-11-03
#### Version: 2.2.17
#### Date: 2015-01-14
#### Patch Number: 00
########################################################################
#### SPECIAL THANKS
@ -20,7 +20,7 @@
#### Gaim/Pidgin, Weechat, KVIrc and Kopete.
#### Original infobash author and copyright holder:
#### Copyright (C) 2005-2007 Michiel de Boer a.k.a. locsmif
#### inxi version: Copyright (C) 2008-2014 Scott Rogers & Harald Hope
#### inxi version: Copyright (C) 2008-2015 Scott Rogers & Harald Hope
#### Further fixes (listed as known): Horst Tritremmel <hjt at sidux.com>
#### Steven Barrett (aka: damentz) - usb audio patch; swap percent used patch
#### Jarett.Stevens - dmidecde -M patch for older systems with the /sys
@ -6377,7 +6377,7 @@ get_init_data()
init_type='Upstart'
# /sbin/init --version == init (upstart 1.12.1)
init_version=$( get_program_version 'init' 'upstart' '3' )
elif type -p epoch &>/dev/null;then
elif [[ -e /proc/1/comm && -n $( grep -s 'epoch' /proc/1/comm ) ]];then
init_type='Epoch'
# epoch version == Epoch Init System 1.0.1 "Sage"
init_version=$( get_program_version 'epoch' '^Epoch' '4' )
@ -6420,7 +6420,6 @@ get_init_data()
# rc_version=$init_version
fi
fi
IFS=$'\n'
A_INIT_DATA=(
@ -11941,7 +11940,6 @@ print_info_data()
if [[ -z $init_type ]];then
init_type='N/A'
fi
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
init_version=${A_INIT_DATA[1]}
if [[ -z $init_version ]];then
@ -11950,18 +11948,16 @@ print_info_data()
init_version=" ${C1}v$SEP3${C2} $init_version"
rc_version=${A_INIT_DATA[3]}
if [[ -n $rc_version ]];then
rc_version=" ${C1}v$SEP3${C2} $rc_version"
rc_version="${C1}v$SEP3${C2} $rc_version "
fi
runlvl_default=${A_INIT_DATA[5]}
fi
# currently only using openrc here, otherwise show nothing
rc_type=${A_INIT_DATA[2]}
if [[ -n $rc_type ]];then
rc_type=" ${C1}rc$SEP3${C2} $rc_type$rc_version"
rc_type="${C1}rc$SEP3${C2} $rc_type $rc_version"
fi
init_type="${C1}Init$SEP3${C2} $init_type$init_version "
runlvl=${A_INIT_DATA[4]}
if [[ -n $runlvl ]];then
runlvl="${C1}$runlvl_title$SEP3${C2} $runlvl "

View file

@ -1,3 +1,21 @@
=====================================================================================
Version: 2.2.17
Patch Version: 00
Script Date: 2015-01-14
-----------------------------------
Changes:
-----------------------------------
New Version, new tarball.
Fixed bugs in Epoch init system detection, caused false positives in systems booted on
SysVinit, but with Epoch installed. Epoch turns out to be in PID 1 == epoch (/proc/1/comm)
so that's easy to fix.
Also fixed spacing isxue with OpenRC output in -I line.
-----------------------------------
-- Harald Hope - Wed, 14 Jan 2015 12:28:00 -0800
=====================================================================================
Version: 2.2.16
Patch Version: 00