--- PVE/API2/Storage/Config.pm | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/PVE/API2/Storage/Config.pm b/PVE/API2/Storage/Config.pm index c36406c..0c41f91 100755 --- a/PVE/API2/Storage/Config.pm +++ b/PVE/API2/Storage/Config.pm @@ -295,6 +295,12 @@ __PACKAGE__->register_method ({ die "can't remove storage - storage is used as base of another storage\n" if PVE::Storage::storage_is_used($cfg, $storeid); + my $cred_file = '/etc/pve/priv/'.$storeid.'.cred'; + + unlink $cred_file + if ($cfg->{ids}->{$storeid}->{type} eq 'cifs') && + (-e $cred_file); + if ($scfg->{type} eq 'rbd' && !defined($scfg->{monhost})) { my $ceph_storage_keyring = "/etc/pve/priv/ceph/${storeid}.keyring"; if (-f $ceph_storage_keyring) { -- 2.11.0 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel