-
a bug in distribution detection…
Hi,
I have a Mandriva 2006 installed on one of my servers which has a /etc/lsb-release file…
here is the Pandora Agent detection code:
[code:1]
if [ -f “/etc/lsb-release” ]
then
OS_VERSION=`cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -f 2 -d “=”`
LINUX_DISTRO=UBUNTU
echo “Detected distribution: $LINUX_DISTRO”
echo “Version: $OS_VERSION”
# *** put your code and vars for UBUNTU here
# CONSOLE_PATH=”/var/www/html”
# *** between those comments
elseSo when executing this, the Mandriva is not anymore a Mandriva but a Ubuntu…
here is the content of my lsb-release:
[code:1]# cat /etc/lsb-release
LSB_VERSION=core-3.0-ia32:core-3.0-noarch
DISTRIB_ID=MandrivaLinux
DISTRIB_RELEASE=
DISTRIB_CODENAME=Cooker
DISTRIB_DESCRIPTION=”Mandriva Linux”So I removed the UBUNTU support in my agents for now.
bye for now.