New version, tarball. Debian has for some reason broken procps / uptime support, for

as of yet unknown reasons, so rather than wait to see the bug resolved, I'm just removing
uptime as a depenendency, though this is a short term hack only because we don't know
why it was removed from procps or if that was just a mistake, or if other things as well might
be vanishing from procps. Am leaving in however uname as dependency because inxi cannot
determine what platform it is when it starts without that.
This commit is contained in:
inxi-svn 2014-10-12 19:11:42 +00:00
parent 14cb52669a
commit 3864eab62f
2 changed files with 35 additions and 9 deletions

21
inxi
View file

@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### Version: 2.2.14 #### Version: 2.2.15
#### Date: 2014-09-26 #### Date: 2014-10-12
#### Patch Number: 00 #### Patch Number: 00
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
@ -53,7 +53,7 @@
#### DEPENDENCIES #### DEPENDENCIES
#### * bash >=3.0 (bash); df, readlink, stty, tr, uname, wc (coreutils); #### * bash >=3.0 (bash); df, readlink, stty, tr, uname, wc (coreutils);
#### gawk (gawk); grep (grep); lspci (pciutils); #### gawk (gawk); grep (grep); lspci (pciutils);
#### ps, uptime (procps); find (findutils) #### ps, uptime (procps - may change in debian); find (findutils)
#### * Also the proc filesystem should be present and mounted for Linux #### * Also the proc filesystem should be present and mounted for Linux
#### * Some features, like -M and -d will not work, or will work incompletely, #### * Some features, like -M and -d will not work, or will work incompletely,
#### if /sys is missing #### if /sys is missing
@ -1062,7 +1062,7 @@ check_required_apps()
eval $LOGFS eval $LOGFS
local app_name='' local app_name=''
# bc removed from deps for now # bc removed from deps for now
local depends="df gawk grep ps readlink tr uname uptime wc" local depends="df gawk grep ps readlink tr uname wc"
if [[ -z $BSD_TYPE ]];then if [[ -z $BSD_TYPE ]];then
depends="$depends lspci" depends="$depends lspci"
@ -2066,7 +2066,7 @@ check_recommends_items()
sed:sed~sed~sed~:string_replace sed:sed~sed~sed~:string_replace
tr:coreutils~coreutils~coreutils~:character_replace tr:coreutils~coreutils~coreutils~:character_replace
uname:uname~coreutils~coreutils~:kernel_data uname:uname~coreutils~coreutils~:kernel_data
uptime:procps~procps~procps~: uptime:procps-(check-package-owner)~procps~procps~:
wc:coreutils~coreutils~coreutils~:word_character_count wc:coreutils~coreutils~coreutils~:word_character_count
' '
local x_recommends=' local x_recommends='
@ -10380,11 +10380,14 @@ get_unmounted_partition_filesystem()
get_uptime() get_uptime()
{ {
eval $LOGFS eval $LOGFS
local uptime_value=''
## note: removing gsub(/ /,"",a); to get get space back in there, goes right before print a ## note: removing gsub(/ /,"",a); to get get space back in there, goes right before print a
local uptime_value="$( uptime | gawk '{ if type -p uptime &>/dev/null;then
uptime_value="$( uptime | gawk '{
a = gensub(/^.*up *([^,]*).*$/,"\\1","g",$0) a = gensub(/^.*up *([^,]*).*$/,"\\1","g",$0)
print a print a
}' )" }' )"
fi
echo "$uptime_value" echo "$uptime_value"
log_function_data "uptime_value: $uptime_value" log_function_data "uptime_value: $uptime_value"
eval $LOGFE eval $LOGFE
@ -10912,6 +10915,9 @@ print_short_data()
local short_data='' i='' b_background_black='false' local short_data='' i='' b_background_black='false'
local memory=$( get_memory_data ) local memory=$( get_memory_data )
local up_time="$( get_uptime )" local up_time="$( get_uptime )"
if [[ -z $up_time ]];then
up_time='N/A - missing uptime?'
fi
# set A_CPU_CORE_DATA # set A_CPU_CORE_DATA
get_cpu_core_count get_cpu_core_count
@ -11872,6 +11878,9 @@ print_info_data()
local memory="$( get_memory_data )" local memory="$( get_memory_data )"
local processes=$(( $( wc -l <<< "$Ps_aux_Data" ) - 1 )) local processes=$(( $( wc -l <<< "$Ps_aux_Data" ) - 1 ))
local up_time="$( get_uptime )" local up_time="$( get_uptime )"
if [[ -z $up_time ]];then
up_time='N/A - missing uptime?'
fi
local patch_version_number=$( get_patch_version_string ) local patch_version_number=$( get_patch_version_string )
local gcc_installed='' gcc_others='' closing_data='' local gcc_installed='' gcc_others='' closing_data=''

View file

@ -1,3 +1,20 @@
=====================================================================================
Version: 2.2.15
Patch Version: 00
Script Date: 2014-10-12
-----------------------------------
Changes:
-----------------------------------
New version, tarball. Debian has for some reason broken procps / uptime support, for
as of yet unknown reasons, so rather than wait to see the bug resolved, I'm just removing
uptime as a depenendency, though this is a short term hack only because we don't know
why it was removed from procps or if that was just a mistake, or if other things as well might
be vanishing from procps. Am leaving in however uname as dependency because inxi cannot
determine what platform it is when it starts without that.
-----------------------------------
-- Harald Hope - Sun, 12 Oct 2014 12:07:03 -0700
===================================================================================== =====================================================================================
Version: 2.2.14 Version: 2.2.14
Patch Version: 00 Patch Version: 00