[osiris-devel] Fwd: [osiris] init script install problem

Brian Wotring brian at shmoo.com
Tue May 25 15:12:17 EDT 2004


Why not just use the -m option to stop after the first match?  For 
example:

     cat /proc/version | grep -oi -m 1 -e 'SuSE' -e 'Red Hat' -e 
'Redhat' -e 'Debian' -e 'Gentoo' | gr A-Z a-z

Begin forwarded message:

> From: Jason 'XenoPhage' Frisvold <friz at godshell.com>
> Date: May 25, 2004 10:34:55 AM MDT
> To: Osiris Users <osiris at lists.shmoo.com>
> Subject: Re: [osiris] init script install problem
> Reply-To: Osiris Users <osiris at lists.shmoo.com>
>
> On Tue, 2004-05-18 at 17:02, Jason 'XenoPhage' Frisvold wrote:
>> Hrm.. slight problem with the install script for the init scripts...
>> Check this out :
>>
>> [friz at jake install]$ cat /proc/version
>> Linux version 2.4.21-15.EL (bhcompile at bugs.build.redhat.com) (gcc
>> version 3.2.3 20030502 (Red Hat Linux 3.2.3-34)) #1 Thu Apr 22 
>> 00:27:41
>> EDT 2004
>> [friz at jake install]$ cat /proc/version | grep -oi -e 'SuSE' -e 'Red 
>> Hat'
>> -e 'Redhat' -e 'Debian' -e 'Gentoo' | tr A-Z a-z
>> red hat
>> redhat
>> red hat
>
> Well, I figured out what's causing this, but I'm not sure how to 
> correct
> it...  I'm hacking on that bit now...
>
> The grep command uses the LC_ALL, LC_*, and LANG variables to determine
> what language to use ....  On one system (old redhat 9 system), it 
> works
> fine.. LANG is set to C.  On my new systems (RHES 3.0), it's set to
> us_EN.UTF-8 and gives the output above...
>
> So, I guess the trick here is to figure out how to get it to report
> correctly in all languages, or to find a different means of detecting
> the OS.
>
> Any ideas?
>
> -- 
> ---------------------------
> Jason 'XenoPhage' Frisvold
> Engine / Technology Programmer
> friz at godshell.com
> RedHat Certified - RHCE # 803004140609871
> MySQL Pro Certified - ID# 207171862
> MySQL Core Certified - ID# 205982910
> ---------------------------
> "Something mysterious is formed, born in the silent void. Waiting alone
> and unmoving, it is at once still and yet in constant motion. It is the
> source of all programs. I do not know its name, so I will call it the
> Tao of Programming."
> _______________________________________________
> osiris mailing list
> osiris at lists.shmoo.com
> https://lists.shmoo.com/mailman/listinfo/osiris




More information about the osiris-devel mailing list