uname output
George Georgalis
george at galis.org
Sat Jul 30 16:45:17 PDT 2005
On Sun, Jul 31, 2005 at 12:29:43AM +0100, Liam J. Foy wrote:
>On Sat(30)/Jul/05 - , George Georgalis wrote:
>> I'm porting some scripts to work under BSD. In some cases I need to test
>> the OS they are running on; the other mainline BSDs have 'BSD' in their
>> 'uname' output, but dfly reads 'DragonFly' would it be reasonable to
>> change it to DragonFlyBSD? Or maybe there is a better way to check?
>>
>
>Can you not just test for 'DragonFly' ?
It's not really a problem, just a subtlety that may not be desireable.
case "`uname`" in
DragonFly|*BSD)
statopts="-f %Mp%Lp:%u:%g:%N"
;;
Linux)
statopts="-c %a:%u:%g:%n"
;;
*)
err="wrong OS."
esac
Best,
// George
--
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george at xxxxxxxxx
More information about the Bugs
mailing list