This is useful when trying to bootstrap onto a new platform, since you can log
in to an otherwise unbootable rootfs to figure out what is going wrong.
The procedure is the same as installing except "rescue/enabled=true" is added
to the command line, hence part of ts-host-install rather than separate.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
my $debconf_priority= $xopts{DebconfPriority};
push @cl, "debconf/priority=$debconf_priority"
if defined $debconf_priority;
+ push @cl, "rescue/enable=true" if $xopts{RescueMode};
return @cl;
}
our %xopts;
-if (@ARGV && $ARGV[0] =~ m/^--priority(?:=(.*))?$/) {
+while (@ARGV and $ARGV[0] =~ m/^-/) {
+ $_= shift @ARGV;
+ last if m/^--$/;
+ if (m/^--priority(?:=(.*))?$/) {
$xopts{DebconfPriority}= defined($1) ? $1 : 'low';
- shift @ARGV;
+ } elsif (m/^--rescue$/) {
+ $xopts{RescueMode}= 1;
+ }
}
our ($whhost) = @ARGV;