Module: OsCtld::ContainerControl::Utils::Wall::Runner
- Included in:
- Commands::Stop::Runner, Commands::StopByHalt::Runner, Commands::StopRunit::Runner, Commands::Wall::Runner
- Defined in:
- lib/osctld/container_control/utils/wall.rb
Instance Method Summary collapse
Instance Method Details
#ct_wall(message) ⇒ Integer
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/osctld/container_control/utils/wall.rb', line 22 def ct_wall() lxc_attach_wait do UtmpReader.read_utmp_fhs(max_entries: 32) do |entry| next if entry.record_type != :user_process begin write_to_tty(File.join('/dev', entry.ut_line), ) rescue SystemCallError next end end end end |
#write_to_tty(path, message) ⇒ Object
38 39 40 |
# File 'lib/osctld/container_control/utils/wall.rb', line 38 def write_to_tty(path, ) File.write(path, ) end |