boklm pushed to branch main at The Tor Project / Applications / RBM

Commits:

2 changed files:

Changes:

  • container
    ... ... @@ -10,7 +10,7 @@ use English;
    10 10
     use Getopt::Long;
    
    11 11
     use Path::Tiny;
    
    12 12
     use File::Path qw(make_path);
    
    13
    -use File::Copy::Recursive qw(pathrmdir rcopy fcopy);
    
    13
    +use File::Copy::Recursive qw(rcopy fcopy);
    
    14 14
     require "syscall.ph";
    
    15 15
     
    
    16 16
     *CLONE_NEWNS   = \0x20000;
    
    ... ... @@ -208,19 +208,6 @@ my %actions = (
    208 208
                 );
    
    209 209
             },
    
    210 210
         },
    
    211
    -    remove => {
    
    212
    -        descr => "Remove a container directory",
    
    213
    -        usage => "$0 remove <container-dir>",
    
    214
    -        run   => sub {
    
    215
    -            usageexit($ARGV[0]) unless @ARGV == 2;
    
    216
    -            exit_error "$ARGV[1] is not a directory" unless -d $ARGV[1];
    
    217
    -            unshare_run(
    
    218
    -                sub {
    
    219
    -                    return pathrmdir($ARGV[1]);
    
    220
    -                }
    
    221
    -            );
    
    222
    -        },
    
    223
    -    },
    
    224 211
         put => {
    
    225 212
             descr => "Copy a file or directory to the container directory",
    
    226 213
             usage => "$0 put <container-dir> <src> <dst> <owner>",
    

  • lib/RBM/DefaultConfig.pm
    ... ... @@ -530,7 +530,7 @@ OPT_END
    530 530
             remote_finish => <<OPT_END,
    
    531 531
     #!/bin/sh
    
    532 532
     set -e
    
    533
    -[% c("rbmdir") %]/container remove '[% c("container/dir") %]'
    
    533
    +[% c("rbmdir") %]/container run -- rm -Rf -- '[% c("container/dir") %]'
    
    534 534
     OPT_END
    
    535 535
     ####
    
    536 536
     ####