]> git.proxmox.com Git - pve-common.git/commitdiff
add parser for /etc/iscsi/initiatorname.iscsi
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 13 Feb 2013 11:49:59 +0000 (12:49 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 13 Feb 2013 11:49:59 +0000 (12:49 +0100)
data/PVE/INotify.pm
debian/changelog

index 77e2fd7aff1c70afd2d254125de33fabec6ca70f..850668a0d730bfc3e83a8413b76466cd0e6ced6c 100644 (file)
@@ -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;
index 4def49baeacd9e88877635b00c1becb457fb6556..39a72611a8cc6a19fa7cddba9ae5433968a6ee6b 100644 (file)
@@ -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 <support@proxmox.com>  Wed, 13 Feb 2013 10:57:20 +0100