]> git.proxmox.com Git - dab.git/commitdiff
make extracting tar archive for /dev opt-in
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 8 Jun 2023 08:55:54 +0000 (10:55 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 8 Jun 2023 08:55:54 +0000 (10:55 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/DAB.pm
dab

index c3f1a2ab924d618c12c8e271b52620ba6f775c4e..e3d5b01c6a4d46ee74eeb083558027aa8954df82 100644 (file)
@@ -1535,7 +1535,7 @@ sub bootstrap {
     }
 
     # setup devices
-    $self->run_command ("tar xzf '$devicetar' -C '$rootdir'");
+    $self->run_command ("tar xzf '$devicetar' -C '$rootdir'") if $opts->{'device-skelleton'};
 
     # avoid warnings about missing default locale
     write_file ("LANG=\"C\"\n", "$rootdir/etc/default/locale", 0644);
diff --git a/dab b/dab
index 0df6306803f703e58517c64c89b481f58da37eea..777177159287bbb948682f390cac8af6d7b64a41 100755 (executable)
--- a/dab
+++ b/dab
@@ -11,7 +11,7 @@ $ENV{'LC_ALL'} = 'C';
 
 my $commands = {
     'init' => '',
-    'bootstrap' => '[--exim] [--include <a[,b..]]>] --exclude [<a[,b..]]>] [--minimal]',
+    'bootstrap' => '[--exim] [--include <a[,b..]]>] --exclude [<a[,b..]]>] [--minimal] [--device-skelleton]',
     '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', 'include=s', 'exclude=s')) {
+       if (!GetOptions ($opts, 'exim', 'minimal', 'device-skelleton', 'include=s', 'exclude=s')) {
            fatal_usage();
        }
        die "command 'bootstrap' expects no arguments.\n" if scalar (@ARGV) != 0;