diff options
| author | Rod Smith <rod.smith@canonical.com> | 2015-01-29 11:24:58 -0500 |
|---|---|---|
| committer | Rod Smith <rod.smith@canonical.com> | 2015-01-29 11:24:58 -0500 |
| commit | ffff5ad0460c1b7d95c50dafe33dc96b809fc2b5 (patch) | |
| tree | c56e50bf3cfce75c49e54e351efece0351cd2b0a | |
| parent | 7f7fd232b5c9b60ed57b19d98cf64f6e14cd0f72 (diff) | |
Conditionalize 'call('reset')' in virtualization script to prevent console reset when output is redirected, since that creates bogus 'inappropriate ioctl for device' messages.
| -rwxr-xr-x | bin/virtualization | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/virtualization b/bin/virtualization index 09872908..38e7231e 100755 --- a/bin/virtualization +++ b/bin/virtualization @@ -327,8 +327,10 @@ final_message: CERTIFICATION BOOT COMPLETE instance = self.boot_image(self.image) time.sleep(self.timeout) - # Reset Console window to regain control from VM Serial I/0 - call('reset') + # If running in console, reset console window to regain + # control from VM Serial I/0 + if os.fstat(0) == os.fstat(1): + call('reset') # Check to be sure VM boot was successful with open(self.debug_file, 'r') as debug_file: file_contents = debug_file.read() |
