Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- name: CPAN Cache
id: cpan-cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: thirdparty
key: ${{ matrix.os }}-cpan-${{ matrix.perl }}-${{ hashFiles('**/cpanfile') }}
Expand Down
10 changes: 8 additions & 2 deletions bin/zadm
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,15 @@ sub main {
last;
};
/^reset$/ && do {
my $opts = {};
Getopt::Long::Configure(qw(permute pass_through));
{
local $SIG{__WARN__} = sub { };
GetOptions($opts, qw(console|c|C)) or pod2usage(1);
}
my $zName = shift @ARGV or pod2usage(1);

$zones->zone($zName)->reset;
$zones->zone($zName, opts => $opts)->reset(\@ARGV);
last;
};
/^console$/ && do {
Expand Down Expand Up @@ -450,7 +456,7 @@ where 'command' is one of the following:
stop [-c [extra_args]] <zone_name>
restart [-c [extra_args]] <zone_name>
poweroff <zone_name>
reset <zone_name>
reset [-c [extra_args]] <zone_name>
login <zone_name>
console [extra_args] <zone_name>
log <zone_name>
Expand Down
2 changes: 1 addition & 1 deletion lib/Zadm/Zone/Emu.pm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ where 'command' is one of the following:
stop [-c [extra_args]] <zone_name>
restart [-c [extra_args]] <zone_name>
poweroff <zone_name>
reset <zone_name>
reset [-c [extra_args]] <zone_name>
console [extra_args] <zone_name>
monitor <zone_name>
vnc [-w] [<[bind_addr:]port>] <zone_name>
Expand Down
1 change: 1 addition & 0 deletions lib/Zadm/Zone/Illumos.pm
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ where 'command' is one of the following:
stop [-c [extra_args]] <zone_name>
restart [-c [extra_args]] <zone_name>
poweroff <zone_name>
reset [-c [extra_args]] <zone_name>
login <zone_name>
console [extra_args] <zone_name>
log <zone_name>
Expand Down
2 changes: 1 addition & 1 deletion lib/Zadm/Zone/LX.pm
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ where 'command' is one of the following:
stop [-c [extra_args]] <zone_name>
restart [-c [extra_args]] <zone_name>
poweroff <zone_name>
reset <zone_name>
reset [-c [extra_args]] <zone_name>
login <zone_name>
console [extra_args] <zone_name>
log <zone_name>
Expand Down
6 changes: 3 additions & 3 deletions lib/Zadm/Zone/base.pm
Original file line number Diff line number Diff line change
Expand Up @@ -580,9 +580,9 @@ sub poweroff($self) {
$self->$zoneCmd('halt');
}

sub reset($self) {
sub reset($self, $cOpts) {
$self->poweroff;
$self->boot;
$self->boot($cOpts);
}

sub login($self) {
Expand Down Expand Up @@ -898,7 +898,7 @@ where 'command' is one of the following:
stop [-c [extra_args]] <zone_name>
restart [-c [extra_args]] <zone_name>
poweroff <zone_name>
reset <zone_name>
reset [-c [extra_args]] <zone_name>
console [extra_args] <zone_name>
log <zone_name>
fw [-r] [-d] [-t] [-m] [-e ipf|ipf6|ipnat] <zone_name>
Expand Down
Loading