[pve-devel] [PATCH storage 06/11] Add remove cifs in API call.
Wolfgang Link
w.link at proxmox.com
Tue Mar 13 15:11:06 CET 2018
---
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 f274593..d6d752a 100755
--- a/PVE/API2/Storage/Config.pm
+++ b/PVE/API2/Storage/Config.pm
@@ -310,6 +310,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
More information about the pve-devel
mailing list