Skip to content

Commit

Permalink
chore: remove debugging lines
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkProminic committed Feb 6, 2023
1 parent a4fc022 commit 8a355cf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/vagrant-zones/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,12 @@ def get_ip_address(uii)
if opts[:dhcp4] && opts[:managed]
vnic_name = "vnic#{nictype(opts)}#{vtype(config)}_#{config.partition_id}_#{opts[:nic_number]}"
PTY.spawn("pfexec zlogin -C #{name}") do |zlogin_read, zlogin_write, pid|
p (zlogin_read.expect(/Connected/))
zlogin_read.expect(/Connected/)
command = "ip -4 addr show dev #{ vnic_name } | grep -Po 'inet \\K[\\d.]+' \r\n"
p (zlogin_read.expect(/\n/) { zlogin_write.printf(command) })
p (zlogin_read.expect(/\n/))
zlogin_read.expect(/\n/) { zlogin_write.printf(command) }
zlogin_read.expect(/\n/)
ip = (zlogin_read.expect(/\n/).to_s.match(/((?:[0-9]{1,3}\.){3}[0-9]{1,3})/))
p ip
Process.kill('HUP', pid)
end
return ip[0] unless ip[0].empty? || ip[0].nil?
Expand Down

0 comments on commit 8a355cf

Please sign in to comment.