Updated script to account for RHEL5 ec2 instances.