Since 12.3, LSB distributor id is now "openSUSE project" and not "SUSE LINUX"

As you might have noticed, I haven’t posted a lot since the beginning of the year, because I am very busy at the moment and still will for a couple months.
I haven’t even installed 12.3 nor updated my repo and my scripts. I will if I can but, as I always say, working day has no more than 48 hours. :wink:

Anyway, most of my scripts are not written just for openSUSE but also for other distros I’m working with. Some of them need to know the distributor, for example in order to install packages or perform other commands which use a different syntax on different distros. I retrieve the vendor name by checking the output of lsb_release. I just learned (received a PM from an user) that in 12.3, the vendor id for openSUSE given by the comment** lsb_release -si** is “openSUSE project” where it used to be “SUSE LINUX” in 12.2 and previous releases. Therefore if a script expects “SUSE LINUX” and finds “openSUSE project”, it won’t detect openSUSE and will either not work or use generic Linux settings (which will probably not work either).

In a script such as nomachine-setup, I advised a user to just add “opensuseproject” to the case statement in order to fix the issue.

case $os in
suselinux|**opensuseproject**)        IS_SUSE=1 ;;
fedora)           IS_FEDORA=1 ;;
mandrivalinux)    IS_MANDRIVA=1 ;;
archlinux)        IS_ARCHLINUX=1 ;;
ubuntu|linuxmint) IS_UBUNTU=1 ; arch=${arch/x86_/amd} ;;
*)         exec  printf "\03331;1m%s not supported yet.\03337;0m

Similar changes might be required in other scripts which rely on lsb_release output (not just mine).

Hello please_try_again and here is hoping the extra work is fruitful for you. I run into this very issue you mention here with my cfu bash script in which I took a code tidbit from you many moons ago and here is how I changed it to work for me:

# install cpufrequtils under openSUSE, Fedora, Mandriva, Ubuntu
suselinux="zypper in"
**opensuseproject="zypper in"**
fedora="yum install"
ubuntu="apt-get install"

# *****************************************************************************
# default to openSUSE if lsb_release is not found (or write more code to install
# lsb_release withouth confirmation or get the release name in another way)
which lsb_release &>/dev/null && install=$(lsb_release -is | tr ":upper:]" ":lower:]" | tr -d " ")

Thank You,

Hi James,

You got it. That’s exactly what I meant as I said that “similar” changes might be required for some scripts to work under 12.3.

They should have fixed this eons ago. I am glad that they woke up now and fixed it.O the downside it does break any such scripts