Article View: comp.os.linux.admin
Article #30Re: How would a script recognize Linux?
From: Bela Lubkin
Date: Wed, 01 Mar 1995 12:24
Date: Wed, 01 Mar 1995 12:24
29 lines
1930 bytes
1930 bytes
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<
Technical Details
Message-ID:
<9503010424.aa10380@srv150a.sco.com>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!gw1.att.com!fnnews.fnal.gov!uwm.edu!news.alpha.net!news.mathworks.com!news.kei.com!xenitec!newsReferences:
<5718@artcom0.north.de>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: 10c7e6,11868e08a7079927,start X-Google-Attributes: gid10c7e6,public X-Google-Thread: 1122ea,27188ece54367802 X-Google-Attributes: gid1122ea,public X-Google-ArrivalTime: 1995-03-01 04:24:27 PST Newsgroups: comp.os.linux.admin,biz.sco.general,comp.unix.xenix.sco Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!gw1.att.com!fnnews.fnal.gov!uwm.edu!news.alpha.net!news.mathworks.com!news.kei.com!xenitec!news From: Bela Lubkin <belal@sco.COM> Subject: Re: How would a script recognize Linux? Resent-From: mmdf@xenitec.on.ca Submit-To: scogen@xenitec.on.ca Cc: pf@artcom0.north.de Organization: [resent by] The SCOGEN gateway and Propagation Society Date: Wed, 1 Mar 1995 12:24:27 GMT Message-ID: <9503010424.aa10380@srv150a.sco.com> References: <5718@artcom0.north.de> Sender: news@xenitec.on.ca (xenitec.on.ca News Administrator) Precedence: bulk Lines: 29