Class: Getch::Chroot

Inherits:
Command show all
Defined in:
lib/getch/command.rb

Instance Attribute Summary

Attributes inherited from Command

#res

Instance Method Summary collapse

Methods inherited from Command

#initialize, #to_s

Constructor Details

This class inherits a constructor from Getch::Command

Instance Method Details

#build_cmdObject



92
93
94
95
96
97
98
99
100
# File 'lib/getch/command.rb', line 92

def build_cmd
  dest = OPTIONS[:mountpoint]
  case OPTIONS[:os]
  when 'gentoo'
    "chroot #{dest} /bin/bash -c \"source /etc/profile; #{@cmd}\""
  when 'void'
    "chroot #{dest} /bin/bash -c \"#{@cmd}\""
  end
end