pve6to7: use file_get_contents
instead of File::Slurp Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
be5d4dd42e
commit
8cbc969924
@ -21,7 +21,6 @@ use PVE::Tools qw(run_command split_list);
|
|||||||
use PVE::QemuServer;
|
use PVE::QemuServer;
|
||||||
use PVE::VZDump::Common;
|
use PVE::VZDump::Common;
|
||||||
|
|
||||||
use File::Slurp;
|
|
||||||
use Term::ANSIColor;
|
use Term::ANSIColor;
|
||||||
|
|
||||||
use PVE::CLIHandler;
|
use PVE::CLIHandler;
|
||||||
@ -606,7 +605,11 @@ sub check_cifs_credential_location {
|
|||||||
sub check_custom_pool_roles {
|
sub check_custom_pool_roles {
|
||||||
log_info("Checking custom roles for pool permissions..");
|
log_info("Checking custom roles for pool permissions..");
|
||||||
|
|
||||||
my $raw = read_file('/etc/pve/user.cfg');
|
my $raw = eval { PVE::Tools::file_get_contents('/etc/pve/user.cfg'); };
|
||||||
|
if ($@) {
|
||||||
|
log_fail("Failed to read '/etc/pve/user.cfg' - $@");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
my $roles = {};
|
my $roles = {};
|
||||||
while ($raw =~ /^\s*(.+?)\s*$/gm) {
|
while ($raw =~ /^\s*(.+?)\s*$/gm) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user