On 07/01/2009 04:40 PM, Javier Palacios wrote:
>> Determines what distro we're running under.
>> """
>> - if os.path.exists("/etc/debian_version"):
>> + if os.path.exists("/etc/lsb-release"):
>> return "debian"
>> elif os.path.exists("/etc/SuSE-release"):
>> return "suse"
>> @@ -818,11 +818,17 @@ def os_release():
>> version = float(version[0])
>> return (make, float(version), rest)
>> elif check_dist() == "debian":
>> - fd = open("/etc/debian_version")
>> - parts = fd.read().split(".")
>> - version = parts[0]
>>
>
> Relying only on /etc/lsb-release will fail on pure debian systems,
> where there is only /etc/debian_version
> _______________________________________________
> cobbler-devel mailing list
> cobbler-devel(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/cobbler-devel
>
What he said :)
Yeah, making sure real-Debian works is important!
uggg - thats the great thing about the LSB, there are so many ways you
can implement it :p
i reckon we'll have to keep the existing debian os detection function
and add a ubuntu function. yuck. i'll fire up a proper debian instance
today and see what ideas i can come up with.
thanks for the heads up javier!
-p
--
Pete Wright
Systems Engineer Demonware
pete(a)demonware.net
office: 310.255.2000 ext 3704
mobile: 604.802.5059