NO CARRIER

Computers, Science, Technology, Xen Virtualization, Hosting, Photography, The Internet, Geekdom And More

Please adopt /etc/vendor

Posted on | January 5, 2009 | 4 Comments

If you package and distribute any kind of POSIX operating system (i.e. it has an /etc), please consider adding a file named /etc/vendor with the following format to your offering:

DistroName DistroVersion DistroDomain

An Example:

Foonix 1.23 foonix.com

One of the biggest headaches for anyone hoping to support as many free operating systems as possible is teaching a program to find out just WHAT operating system its running on.  Digging through /etc/redhat-release, /etc/issue, /etc/issue.net and the dozen other possibilities just sucks.

I can’t believe we’ve come this far and not one standard file to identify a vendor and release has been adopted.  Something so simple makes writing very portable applications rather maddening :)

Comments

4 Responses to “Please adopt /etc/vendor”

  1. Kalyan
    January 5th, 2009 @ 2:43 am

    I am facing that very maddening thing in my Linux system programming and operating systems lab, mostly for the fact everything is going over my head …

    Simple things like that would definitely save a lot of time and frustration and maybe grades too :) !!

  2. tinkertim
    January 5th, 2009 @ 3:09 am

    @Kalyan,

    Sometimes the simplest of things just fall through some crack. For instance, you will likely soon need to discover how many times your kernel ticks per second .. in order to properly divide exported /proc units to get a number you can work with :) Hint, sysconf() is not going to work, no user space interface exists to obtain this value, unless you just want the value of clock_t.

    That being said, Linux (and most Unix like operating systems) are still the most developer friendly systems to work with, you’ll have fun with this course in your studies.

    THAT being said, I want my vendor neutral /etc/vendor file :) Three fields .. you’d think they could manage it?

  3. Alex
    January 5th, 2009 @ 3:15 pm

    LSB specifies the file /etc/lsb-release. On my Ubuntu system, this contains the following:

    DISTRIB_ID=Ubuntu DISTRIB_RELEASE=8.10 DISTRIB_CODENAME=intrepid DISTRIB_DESCRIPTION=”Ubuntu 8.10″

  4. tinkertim
    January 5th, 2009 @ 8:20 pm

    @Alex

    Though I have mixed feelings about some parts of the LSB, I think that most of it makes sense. I am especially fond of the new application checker which is really handy to point out potential portability issues. Unfortunately, it seems to have been taken seriously only in the last year with regards to minute details like this. For instance, the entry does not exist in CentOS 5, earlier versions of Debian / Ubuntu and others. Not sure about Fedora 9, but I think FC3 – FC8 also lack it. Then there is Slackware and its kids, various scientific blends and more.

    Then we have the BSD’s .. and emerging OS’s that might not be very “Unix Like”, but offer a relatively POSIX compatible C library for userspace.

    I think its really funny that this problem has lingered for so long :)

Leave a Reply





  • Monkey Plus Typewriter
  • Stack Overflow

  • Me According To Ohloh

  • Meta