mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
Added hack to get distro for arch, which has a bug about empty /etc/arch-release and jumbled /etc/issue
This commit is contained in:
parent
696ee1b3e7
commit
c63f96f40e
11
inxi
11
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 0.2.3
|
||||
#### version: 0.2.4
|
||||
#### Date: October 30 2008
|
||||
########################################################################
|
||||
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
||||
|
@ -12,6 +12,10 @@
|
|||
#### Gaim/Pidgin, Weechat, KVIrc and Kopete.
|
||||
#### Original infobash author and copyright holder:
|
||||
#### Copyright (C) 2005-2007 Michiel de Boer a.k.a. locsmif <infobash@rebelhomicide.demon.nl>
|
||||
#### inxi version: Copyright (C) 2008 Warren Scott Rogers & Harald Hope
|
||||
####
|
||||
#### Current script home page: http://techpatterns.com/forums/about1131.html
|
||||
#### Script svn: http://code.google.com/p/inxi
|
||||
####
|
||||
#### This program is free software; you can redistribute it and/or modify
|
||||
#### it under the terms of the GNU General Public License as published by
|
||||
|
@ -870,6 +874,11 @@ get_distro_data()
|
|||
## note: figure out a more readable way to achieve whatever is intended here ##
|
||||
: ${distro:=Unknown distro o_O}
|
||||
|
||||
# this handles an arch bug where /etc/arch-release is empty and /etc/issue is corrupted
|
||||
if [ -n "$( grep -i 'arch linux' <<< $distro )" ]
|
||||
then
|
||||
distro='Arch Linux'
|
||||
fi
|
||||
echo "$distro"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue