atarallo / TECMINT_MONITOR

A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux. Originally published on http://www.tecmint.com
Apache License 2.0
248 stars 145 forks source link

lsb_release first #23

Closed Sim4n6 closed 8 years ago

Sim4n6 commented 8 years ago

I am doing some research to figure out the best way to extract the distributions information.

I have found the Linux Standard Base (LSB). :

The Linux Standard Base is a project under the Free Standards Group. It attempts to develop and promote a set of binary standards that will increase compatibility among GNU/Linux and other similar systems. These standards will also enable software applications to run on any conforming system.

While the main goal of the LSB project is to increase compatibility among GNU/Linux distributions by specifying and promoting standards for their use, it does not limit the applicability of the specification to only the GNU/Linux environment. The LSB specification has been written so that it can be readily implemented on any UNIX-like operating system, natively or as a compatibility layer. With some more work, it can also be implemented on other operating systems.

Any distribution that supports Linux Standard Base Core Specification 3.1 will contain :
a command _lsbrelease that prints certain LSB (Linux Standard Base) and Distribution information in a normalized way.

So I suggest to use it first in the script before checking any other information about the distos.

atarallo commented 8 years ago

It could be a good idea to change the code we're actually using for something based on LSB for Linux.

Sim4n6 commented 8 years ago

assign it to me please :+1:

atarallo commented 8 years ago

As requested, asssigned to you.

Sim4n6 commented 8 years ago

the idea in #25 is to use lsb_release in case it is available, please I checked the script on Ubuntu GNU/Linux 16.04 not other distos

atarallo commented 8 years ago

I looked your contribution. Good Job! I'll be testing it on my PCs