[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Tell Ubuntu and Debian apart in a shell script ...



 On 08/25/2010 05:03 PM, Oliver Schneider wrote:
Hi again,

Can you look in /etc/issue (or maybe /etc/debian_version)?
As a matter of fact that was my first naive method. It does work for Debian (unless changed by someone), but on Ubuntu this always contains the same string as far as I saw "squeeze/sid".

However, it could be that I'm on to something with:

(which lsb_release>  /dev/null&&  `which lsb_release` --id)|awk '{print $3}'

... does not work on older systems which don't have lsb_release, though.


Still looking,

// Oliver

Maybe use lsb_release, and grep /etc/apt/sources.list as a fallback method?


Reply to: