On 6/29/18 1:20 PM, Thomas Lamprecht wrote:
> Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com>
> ---
>  PVE/API2/Storage/Config.pm | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/PVE/API2/Storage/Config.pm b/PVE/API2/Storage/Config.pm
> index 258820d..49cf3c8 100755
> --- a/PVE/API2/Storage/Config.pm
> +++ b/PVE/API2/Storage/Config.pm
> @@ -154,6 +154,8 @@ __PACKAGE__->register_method ({
>  
>               $cfg->{ids}->{$storeid} = $opts;
>  
> +             my $cred_file = undef;
> +
>               if ($type eq 'lvm' && $opts->{base}) {
>  
>                   my ($baseid, $volname) = 
> PVE::Storage::parse_volume_id($opts->{base});
> @@ -186,11 +188,11 @@ __PACKAGE__->register_method ({
>                       unlink $ceph_storage_keyring;
>                       die "failed to copy ceph authx keyring for storage 
> '$storeid': $err\n";
>                   }
> +             } elsif ($type eq 'cifs' && defined($password)) {
> +                 # create a password file in /etc/pve/priv,
> +                 # this file is used as a cert_file at mount time.
> +                 $cred_file = 
> PVE::Storage::CIFSPlugin::cifs_set_credentials($password, $storeid);
>               }
> -             # create a password file in /etc/pve/priv,
> -             # this file is used as a cert_file at mount time.
> -             my $cred_file = 
> PVE::Storage::CIFSPlugin::cifs_set_credentials($password, $storeid)
> -                 if $type eq 'cifs' && defined($password);
>  
>               eval {
>                   # try to activate if enabled on local node,
> 

applied series, much thanks to Wolfgang for his test/review!

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to