Add remove cifs in API call.

This commit is contained in:
Wolfgang Link
2018-03-16 10:22:53 +01:00
committed by Dietmar Maurer
parent a4a9405d76
commit ba7e9ba9c9

View File

@ -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) {