use warnings;
use strict;
+use Errno;
use Sys::Guestfs;
use Sys::Guestfs::Lib qw(open_guest);
use Pod::Usage;
$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;
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)>,