From eb6f49f4b2fbb1574d86226d3d7edaffb55fc840 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 15 Nov 2022 07:25:32 +0100 Subject: [PATCH] cache: allow importing nodename method Signed-off-by: Thomas Lamprecht --- src/PVE/INotify.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index 0df6c8e..bc33a8f 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -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;