strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
added booted?/boot methods
[strongswan.git]
/
src
/
dumm
/
ext
/
lib
/
dumm
/
guest.rb
diff --git
a/src/dumm/ext/lib/dumm/guest.rb
b/src/dumm/ext/lib/dumm/guest.rb
index
a65a0a7
..
8f5abb5
100644
(file)
--- a/
src/dumm/ext/lib/dumm/guest.rb
+++ b/
src/dumm/ext/lib/dumm/guest.rb
@@
-41,6
+41,23
@@
module Dumm
i.delete
}
end
+
+ # has the guest booted up?
+ def booted?
+ begin
+ exec("pgrep getty")
+ rescue
+ return false
+ end
+ return true
+ end
+
+ # wait until the guest has booted
+ def boot
+ while not booted?
+ sleep(1)
+ end
+ end
end
end