From: Fabian Ebner Date: Tue, 4 May 2021 08:10:01 +0000 (+0200) Subject: add create_file_system function X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=728a642c53a4e2cbdd75152ca00c6321cd961433;p=pve-zsync.git add create_file_system function Signed-off-by: Fabian Ebner --- diff --git a/pve-zsync b/pve-zsync index a327d42..101dc03 100755 --- a/pve-zsync +++ b/pve-zsync @@ -171,6 +171,19 @@ sub check_dataset_exists { return 1; } +sub create_file_system { + my ($file_system, $ip, $user) = @_; + + my $cmd = []; + + if ($ip) { + push @$cmd, 'ssh', "$user\@$ip", '--'; + } + push @$cmd, 'zfs', 'create', $file_system; + + run_cmd($cmd); +} + sub parse_target { my ($text) = @_;