git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fish: Change 'int argc' to 'size_t argc' throughout.
[libguestfs.git]
/
tools
/
virt-rescue
diff --git
a/tools/virt-rescue
b/tools/virt-rescue
index
1f292f6
..
b8902a5
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;
@@
-223,6
+228,13
@@
exit 0;
Several environment variables affect virt-rescue. See
L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list.
Several environment variables affect virt-rescue. See
L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list.
+=head1 SHELL QUOTING
+
+Libvirt guest names can contain arbitrary characters, some of which
+have meaning to the shell such as C<#> and space. You may need to
+quote or escape these characters on the command line. See the shell
+manual page L<sh(1)> for details.
+
=head1 SEE ALSO
L<guestfs(3)>,
=head1 SEE ALSO
L<guestfs(3)>,