-=cut
-
-GetOptions ("help|?" => \$help,
- "version" => \$version,
- "append=s" => \$append,
- "connect|c=s" => \$uri,
- "format=s" => \$format,
- "memsize|m=i" => \$memsize,
- "network" => \$network,
- "ro|r" => \$readonly,
- "selinux" => \$selinux,
- ) or pod2usage (2);
-pod2usage (1) if $help;
-if ($version) {
- my $g = Sys::Guestfs->new ();
- my %h = $g->version ();
- print "$h{major}.$h{minor}.$h{release}$h{extra}\n";
- exit
-}
-
-pod2usage (__"virt-rescue: no image or VM names rescue given")
- if @ARGV == 0;
-
-my @args = (\@ARGV);
-push @args, address => $uri if $uri;
-push @args, rw => 1 unless $readonly;
-push @args, format => $format if defined $format;
-my $g = open_guest (@args);
-
-# Setting "direct mode" is required for the rescue appliance.
-$g->set_direct (1);
-
-# Set other features.
-$g->set_selinux (1) if $selinux;
-$g->set_memsize ($memsize) if defined $memsize;
-$g->set_network (1) if $network;
-
-# Set the kernel command line, which must include guestfs_rescue=1
-# (see appliance/init).
-my $str = "guestfs_rescue=1";
-$str .= " $append" if defined $append;
-$g->set_append ($str);
-
-# Run the appliance. This won't return until the user quits the
-# appliance.
-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;
+=head1 OLD-STYLE COMMAND LINE ARGUMENTS
+
+Previous versions of virt-rescue allowed you to write either:
+
+ virt-rescue disk.img [disk.img ...]
+
+or
+
+ virt-rescue guestname
+
+whereas in this version you should use I<-a> or I<-d> respectively
+to avoid the confusing case where a disk image might have the same
+name as a guest.
+
+For compatibility the old style is still supported.