module Aix::Exec

Public Instance Methods

get_ip() click to toggle source
# File lib/beaker/host/aix/exec.rb, line 8
def get_ip
  execute("ifconfig -a inet| awk '/broadcast/ {print $2}' | cut -d/ -f1 | head -1").strip
end
reboot() click to toggle source
# File lib/beaker/host/aix/exec.rb, line 4
def reboot
  exec(Beaker::Command.new("shutdown -Fr"), :expect_connection_failure => true)
end
ssh_permit_user_environment() click to toggle source

Sets the PermitUserEnvironent setting & restarts the SSH service

@api private @return [Result] result of the command starting the SSH service

(from {#ssh_service_restart}).
# File lib/beaker/host/aix/exec.rb, line 25
def ssh_permit_user_environment
  exec(Beaker::Command.new("echo '\nPermitUserEnvironment yes' >> /etc/ssh/sshd_config"))
  ssh_service_restart
end
ssh_service_restart() click to toggle source

Restarts the SSH service

@return [Result] result of starting ssh service

# File lib/beaker/host/aix/exec.rb, line 15
def ssh_service_restart
  exec(Beaker::Command.new("stopsrc -g ssh"))
  exec(Beaker::Command.new("startsrc -g ssh"))
end