From ddd3d224258f318b26b5fb62cf7ecafa90664dd8 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 13 Feb 2013 12:49:59 +0100 Subject: [PATCH] add parser for /etc/iscsi/initiatorname.iscsi --- data/PVE/INotify.pm | 16 ++++++++++++++++ debian/changelog | 2 ++ 2 files changed, 18 insertions(+) diff --git a/data/PVE/INotify.pm b/data/PVE/INotify.pm index 77e2fd7..850668a 100644 --- a/data/PVE/INotify.pm +++ b/data/PVE/INotify.pm @@ -957,4 +957,20 @@ register_file('interfaces', "/etc/network/interfaces", \&read_etc_network_interfaces, \&write_etc_network_interfaces); + +sub read_iscsi_initiatorname { + my ($filename, $fd) = @_; + + while (defined(my $line = <$fd>)) { + if ($line =~ m/^InitiatorName=(\S+)$/) { + return $1; + } + } + + return 'undefined'; +} + +register_file('initiatorname', "/etc/iscsi/initiatorname.iscsi", + \&read_iscsi_initiatorname); + 1; diff --git a/debian/changelog b/debian/changelog index 4def49b..39a7261 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ libpve-common-perl (1.0-46) unstable; urgency=low * revert vlan changes + + * add parser for /etc/iscsi/initiatorname.iscsi -- Proxmox Support Team Wed, 13 Feb 2013 10:57:20 +0100 -- 2.39.2