Add set CIFS credentials.
This commit is contained in:
committed by
Dietmar Maurer
parent
4792d439ad
commit
f79a699c13
@ -36,6 +36,18 @@ my $api_storage_config = sub {
|
|||||||
return $scfg;
|
return $scfg;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my $set_cifs_credentials = sub {
|
||||||
|
my ($password, $storeid) = @_;
|
||||||
|
|
||||||
|
my $cred_path = '/etc/pve/priv/';
|
||||||
|
|
||||||
|
my $cred_file = $cred_path.$storeid.".cred";
|
||||||
|
|
||||||
|
PVE::Tools::file_set_contents($cred_file, "password=$password\n");
|
||||||
|
|
||||||
|
return $cred_file;
|
||||||
|
};
|
||||||
|
|
||||||
__PACKAGE__->register_method ({
|
__PACKAGE__->register_method ({
|
||||||
name => 'index',
|
name => 'index',
|
||||||
path => '',
|
path => '',
|
||||||
|
|||||||
Reference in New Issue
Block a user