X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=tools%2Fvirt-rescue;h=b8902a593657a10245db6f59ccb8ce553606c87a;hb=6391d1a7cfa10337a75465c72d49df3c9ebc65ca;hp=1f292f6071968c0e2b4b0ad3e36d0a40a681451e;hpb=f35365ecbf348f1030581e59795435987b8adf0f;p=libguestfs.git diff --git a/tools/virt-rescue b/tools/virt-rescue index 1f292f6..b8902a5 100755 --- a/tools/virt-rescue +++ b/tools/virt-rescue @@ -19,6 +19,7 @@ use warnings; use strict; +use Errno; 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); -# Run the appliance. This won't return until the user quite the +# Run the appliance. This won't return until the user quits the # 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; @@ -223,6 +228,13 @@ exit 0; Several environment variables affect virt-rescue. See L 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 for details. + =head1 SEE ALSO L,