Closed yvesguerinmtl closed 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.
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,
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.
Dear,
Yes, try to code more generic (not only for debian but for UNIX/Linux/Apple) :)
Regards,
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 UbuntuRegards