summaryrefslogtreecommitdiffstats
path: root/installer/OpenSLX/OSExport/BlockDevice/NBD.pm
diff options
context:
space:
mode:
authorOliver Tappe2007-07-01 22:28:50 +0200
committerOliver Tappe2007-07-01 22:28:50 +0200
commit6974fa8b0419bbd0711f79c8b78e07a9543810dd (patch)
tree25141f0f4d20ca8fdb1c845edf5b9ce4b24a6e98 /installer/OpenSLX/OSExport/BlockDevice/NBD.pm
parentTried to add Ubuntu 7.04 to the list of cloneable systems. (diff)
downloadcore-6974fa8b0419bbd0711f79c8b78e07a9543810dd.tar.gz
core-6974fa8b0419bbd0711f79c8b78e07a9543810dd.tar.xz
core-6974fa8b0419bbd0711f79c8b78e07a9543810dd.zip
* activated 'use warnings' to all modules and adjusted all occurences of
'use of uninitialized values', a couple of which might still show up * adjusted all code with respect to passing perlcritic level 4 and 5 git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1207 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer/OpenSLX/OSExport/BlockDevice/NBD.pm')
-rw-r--r--installer/OpenSLX/OSExport/BlockDevice/NBD.pm14
1 files changed, 6 insertions, 8 deletions
diff --git a/installer/OpenSLX/OSExport/BlockDevice/NBD.pm b/installer/OpenSLX/OSExport/BlockDevice/NBD.pm
index 8afaa97f..89f10b66 100644
--- a/installer/OpenSLX/OSExport/BlockDevice/NBD.pm
+++ b/installer/OpenSLX/OSExport/BlockDevice/NBD.pm
@@ -14,12 +14,11 @@
# -----------------------------------------------------------------------------
package OpenSLX::OSExport::BlockDevice::NBD;
-use vars qw($VERSION);
+use strict;
+use warnings;
+
use base qw(OpenSLX::OSExport::BlockDevice::Base);
-$VERSION = 1.01; # API-version . implementation-version
-use strict;
-use Carp;
use File::Basename;
use OpenSLX::Basics;
use OpenSLX::ConfigDB qw(:support);
@@ -59,10 +58,9 @@ sub generateExportURI
my $self = shift;
my $export = shift;
- my $server =
- length($export->{server_ip})
- ? $export->{server_ip}
- : generatePlaceholderFor('serverip');
+ my $serverIP = $export->{server_ip} || '';
+ my $server
+ = length($serverIP) ? $serverIP : generatePlaceholderFor('serverip');
$server .= ":$export->{port}" if length($export->{port});
return "nbd://$server";