# HCaix.def: AIX Specific Code # $Id: HCaix.def,v 1.10 2008/02/25 17:32:54 mschenke Exp $ # ARCS: $Header: /home/cvs/repository/RDA_4/src/scripting/lib/modules/HCaix.def,v 1.10 2008/02/25 17:32:54 mschenke Exp $ # # Change History # 20080225 MSC Change the copyright notice. =head1 NAME HCaix - Sub Module Specific to the AIX Operating System =cut # Make the module persistent keep $KEEP_BLOCK,@SHARE_MACROS var @SHARE_MACROS = ('get_df') =head1 DESCRIPTION This module determines the operating system version and its bit size. The following macro is available: =cut debug ' Inside END module, determining operating system characteristics' import $OS_BIT,$OS_LVL,$OS_NAM,$OS_PLT,$OS_VER var $OS_BIT = 32 var ($OS_LVL) = command('oslevel -r') var $OS_NAM = getOsName() var $OS_PLT = 'AIX' var ($OS_VER) = command('oslevel') if expr('>',\ concat(substr($OS_VER,0,1),substr($OS_VER,2,1),substr($OS_VER,4,1)),\ 430) {var ($str) = command('lslpp -l bos.64bit 2>&1') if !match($str,'not installed') var $OS_BIT = 64 } =head2 get_df($dir) This macro returns the number of free KiB on the file system containing the specified directory. =cut macro get_df {var ($dir) = @arg var ($lin) = grepCommand(concat('df -k ',quote($dir,'x')),'\s\d+\%') var (undef,undef,$siz) = split('\s+',$lin,4) return $siz } =head1 COPYRIGHT NOTICE Copyright (c) 2002-2008, Oracle. All rights reserved. =head1 TRADEMARK NOTICE Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. =cut