]> git.proxmox.com Git - pve-common.git/commitdiff
cache: allow importing nodename method
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 15 Nov 2022 06:25:32 +0000 (07:25 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 15 Nov 2022 06:25:36 +0000 (07:25 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/INotify.pm

index 0df6c8ea4bbbec5324bf8350300fdf8a3bbc432b..bc33a8fe6443c8f17fef1e59611045a0f36663e1 100644 (file)
@@ -25,7 +25,7 @@ use PVE::Tools;
 
 use base 'Exporter';
 
-our @EXPORT_OK = qw(read_file write_file register_file);
+our @EXPORT_OK = qw(read_file write_file register_file nodename);
 
 my $ccache;
 my $ccachemap;
@@ -500,13 +500,10 @@ sub inotify_init {
 }
 
 my $cached_nodename;
-
 sub nodename {
-
     return $cached_nodename if $cached_nodename;
 
     my ($sysname, $nodename) = POSIX::uname();
-
     $nodename =~ s/\..*$//; # strip domain part, if any
 
     die "unable to read node name\n" if !$nodename;