Signed-off-by: Luke Harding <[email protected]>
---
 PVE/DAB.pm | 9 +++++++++
 dab        | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/PVE/DAB.pm b/PVE/DAB.pm
index 59397f2..eb77aa1 100644
--- a/PVE/DAB.pm
+++ b/PVE/DAB.pm
@@ -1295,6 +1295,15 @@ sub bootstrap {
     my $add_systemd_sysv_as_required = $suiteinfo->{systemd};
     push @$required, 'systemd-sysv' if $add_systemd_sysv_as_required;
 
+    if ($opts->{'no-ssh'}) {
+        my %remove = (
+            'ssh' => 1,
+            'openssh-server' => 1,
+        );
+
+        @{ $important } = grep { !$remove{$_} } @{ $important };
+    }
+
     my $mta = $opts->{exim} ? 'exim' : 'postfix';
     if ($mta eq 'postfix') {
        push @$important, "postfix";
diff --git a/dab b/dab
index c01c513..3a4c017 100755
--- a/dab
+++ b/dab
@@ -11,7 +11,7 @@ $ENV{'LC_ALL'} = 'C';
 
 my $commands = {
     'init' => '',
-    'bootstrap' => '[--exim] [--include <a[,b..]]>] --exclude [<a[,b..]]>] 
[--minimal] [--device-skelleton]',
+    'bootstrap' => '[--exim] [--include <a[,b..]]>] --exclude [<a[,b..]]>] 
[--minimal] [--device-skelleton] [--no-ssh]',
     'finalize' => '[--keepmycnf] [--compressor <gz[ip] 
(default)|zst[d]|zstd-max>]',
     'veid' => '',
     'basedir' => '',
@@ -84,7 +84,7 @@ eval {
 
     } elsif ($cmd eq 'bootstrap') {
        my $opts = {};
-       if (!GetOptions ($opts, 'exim', 'minimal', 'device-skelleton', 
'include=s', 'exclude=s')) {
+       if (!GetOptions ($opts, 'exim', 'minimal', 'device-skelleton', 
'include=s', 'exclude=s', 'no-ssh')) {
            fatal_usage();
        }
        die "command 'bootstrap' expects no arguments.\n" if scalar (@ARGV) != 
0;
-- 
2.52.0


_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to