Article View: comp.os.linux.admin
Article #25Re: How would a script recognize Linux?
From: Cliff Bedore
Date: Thu, 02 Mar 1995 12:39
Date: Thu, 02 Mar 1995 12:39
36 lines
1917 bytes
1917 bytes
In article <9503010424.aa10380@srv150a.sco.com>, Bela Lubkin <belal@sco.COM> writes: >Peter Funk wrote: > >> One precaution must be taken: SCO Unix has a broken uname program: >> 'uname -s' returns the node name rather than "SCO" or "Unix", so in >> order to adjust a script to recognize such a weird platform also, >> it should contain something like this : >> >> OS=`uname -s` >> case $OS in >> HP-Ux) ..... ;; >> IRIX) ..... ;; >> Linux) ..... ;; >> SunOS) ..... ;; >> XENIX) .... ;; >> *) if [ "$OS" = `uname -n` ] >> then OS=SCOUNIX >> else OS=VanillaUnix >> fi ;; >> esac > >This will be fixed in our next release, which will use the symbol >"SCO_SV". So you might want to use that symbol to make the transition >smoother. i.e.: then OS=SCO_SV > >I also don't remember whether SCO XENIX actually gives a reasonable >response to `uname -s`, and I don't have a XENIX machine handy to test >right now. > >>Bela< My SCO XENIX 2.3.3 returns XENIX for uname -s Cliff cliffb@cjbsys.bdb.com
Technical Details
Message-ID:
<D4tCHF.36w@cjbsys.bdb.com>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!leviticus!cjbsys!newsReferences:
<9503010424.aa10380@srv150a.sco.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 100df9,650d05e30da3de92 X-Google-Attributes: gid100df9,public X-Google-Thread: 1122ea,27188ece54367802 X-Google-Attributes: gid1122ea,public X-Google-Thread: 10c7e6,11868e08a7079927 X-Google-Attributes: gid10c7e6,public X-Google-ArrivalTime: 1995-03-05 16:35:36 PST Newsgroups: comp.os.linux.admin,biz.sco.general,comp.unix.xenix.sco Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!leviticus!cjbsys!news From: cliffb@bdb.com (Cliff Bedore) Subject: Re: How would a script recognize Linux? Reply-To: cliffb@bdb.com Organization: BDB Systems Date: Thu, 2 Mar 1995 12:39:14 GMT Message-ID: <D4tCHF.36w@cjbsys.bdb.com> References: <9503010424.aa10380@srv150a.sco.com> Sender: news@cjbsys.bdb.com (news system) Nntp-Posting-Host: fearless.bdb.com Lines: 38