On 10/10/2012 1:04 PM, Heiko Nardmann wrote:
> Am 10.10.2012 10:11, schrieb Fabio M. Di Nitto:
>> [snip]
>> that doesn´t scale well for debian derivates that don´t ship
>> debian_version :) (see ubuntu & co..)
>>
>> You can´t even use something like "which dpkg" since the tool is
>> available on rpm based distributions... or viceversa.. there is rpm for
>> Debian & derivates.
>>
>> hardcoding all distributions is not optimal either, as they might change
>> policy by version....
>>
>> Fabio
>>
> 
> What about 'lsb_release'? Is that executable available on all platforms?


Not installed by default, it´s generally shipped with $distro-lsb
metapackage that pulls in half gazillions dependencies.

I doubt it would solve anything since you still need to parse the
output. It´s really no different than hardcoding /etc/$distro_release,
actually with a few GB of extra packages ;)

Fabio

Reply via email to