opennms-forge / opennms-install

Basic install script for default Linux systems
GNU General Public License v3.0
23 stars 15 forks source link

bootstrap-debian.sh on Ubuntu 14.04 #8

Closed yvesguerinmtl closed 6 years ago

yvesguerinmtl commented 6 years ago

Dear,

Please do not relay on /etc/issue to discover the Os version use uname -a | grep $REQUIRED_SYSTEMS because I changed my /etc/issue and it does not contain anymore the word Ubuntu

Regards

indigo423 commented 6 years ago

I would like to change the script to use the lsb_release -a command instead. Would it work for you as well? What do you think?

Here is a sample output in Debian and should work on Ubuntu as well.

root@stretch:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.4 (stretch)
Release:    9.4
Codename:   stretch

Thank you for reporting and help to improve our scripts.

yvesguerinmtl commented 6 years ago

Dear,

uname -a | grep $REQUIRED_SYSTEMS will work almost on every UNIX/Linux system, the "uname" command is universal on UNIX/Linux system (Mac OS X also), so if I were you I will use the "uname" command.

Regards,

indigo423 commented 6 years ago

Ah ok, sorry with $REQUIRED_SYSTEMS you mean the variable inside the script. I got it, make the change to make the script more reliable.

yvesguerinmtl commented 6 years ago

Dear,

Yes, try to code more generic (not only for debian but for UNIX/Linux/Apple) :)

Regards,