#!/usr/local/bin/perl # # $Header: emdb/sysman/admin/scripts/has/has_os.pl /st_emdbsa_11.2/2 2009/04/03 10:06:39 vthondep Exp $ # # has_os.pl # # Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. # # NAME # has_os.pl - # # DESCRIPTION # # # NOTES # # # MODIFIED (MM/DD/YY) # rsamaved 03/27/09 - fix linux OS # ajdsouza 12/10/08 - Creation # use strict; use warnings; use locale; BEGIN { use POSIX qw(locale_h); my $clocale='C'; for ( qw ( LC_ALL LC_COLLATE LC_CTYPE LC_TIME LC_NUMERIC LC_MESSAGES LC_MONETARY LANG LANGUAGE ) ) { $ENV{$_}=$clocale; } setlocale(LC_ALL,$clocale) or warn "WARN:Failed to set locale to $clocale \n "; } require "semd_common.pl"; my $os = $^O; $os = 'Windows' if $os =~ /win/i; $os = 'Linux' if $os =~ /linux/i; my $osType = get_osType(); $os = '' unless $os; $osType = '' unless $osType; print "em_result=$os|$osType\n"; exit 0;