git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add test for virt-resize.
[libguestfs.git]
/
tools
/
virt-rescue
diff --git
a/tools/virt-rescue
b/tools/virt-rescue
index
1f292f6
..
7a87fbc
100755
(executable)
--- a/
tools/virt-rescue
+++ b/
tools/virt-rescue
@@
-19,6
+19,7
@@
use warnings;
use strict;
use warnings;
use strict;
+use Errno;
use Sys::Guestfs;
use Sys::Guestfs::Lib qw(open_guest);
use Pod::Usage;
use Sys::Guestfs;
use Sys::Guestfs::Lib qw(open_guest);
use Pod::Usage;
@@
-212,9
+213,13
@@
my $str = "guestfs_rescue=1";
$str .= " $append" if defined $append;
$g->set_append ($str);
$str .= " $append" if defined $append;
$g->set_append ($str);
-# Run the appliance. This won't return until the user quit
e
the
+# Run the appliance. This won't return until the user quit
s
the
# appliance.
# appliance.
-$g->launch ();
+eval { $g->launch (); };
+
+# launch() expects guestfsd to start. However, virt-rescue doesn't run guestfsd,
+# so this will always fail with ECHILD when the appliance exits unexpectedly.
+die $@ unless $!{ECHILD};
exit 0;
exit 0;