diff options
Diffstat (limited to 'installer/OpenSLX/OSExport/FileSystem')
-rw-r--r-- | installer/OpenSLX/OSExport/FileSystem/Base.pm | 7 | ||||
-rw-r--r-- | installer/OpenSLX/OSExport/FileSystem/NFS.pm | 3 | ||||
-rw-r--r-- | installer/OpenSLX/OSExport/FileSystem/SquashFS.pm | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/installer/OpenSLX/OSExport/FileSystem/Base.pm b/installer/OpenSLX/OSExport/FileSystem/Base.pm index 1014d596..05f3c6a0 100644 --- a/installer/OpenSLX/OSExport/FileSystem/Base.pm +++ b/installer/OpenSLX/OSExport/FileSystem/Base.pm @@ -19,6 +19,7 @@ use warnings; our $VERSION = 1.01; # API-version . implementation-version use File::Basename; +use Scalar::Util qw( weaken ); use OpenSLX::Basics; use OpenSLX::Utils; @@ -33,6 +34,12 @@ sub new sub initialize { + my $self = shift; + my $engine = shift; + + $self->{'engine'} = $engine; + weaken($self->{'engine'}); + # avoid circular reference between file-system and its engine } sub exportVendorOS diff --git a/installer/OpenSLX/OSExport/FileSystem/NFS.pm b/installer/OpenSLX/OSExport/FileSystem/NFS.pm index b9d88689..9bd2ca87 100644 --- a/installer/OpenSLX/OSExport/FileSystem/NFS.pm +++ b/installer/OpenSLX/OSExport/FileSystem/NFS.pm @@ -40,7 +40,8 @@ sub initialize my $self = shift; my $engine = shift; - $self->{'engine'} = $engine; + $self->SUPER::initialize($engine); + my $exportBasePath = "$openslxConfig{'public-path'}/export"; $self->{'export-path'} = "$exportBasePath/nfs/$engine->{'vendor-os-name'}"; return; diff --git a/installer/OpenSLX/OSExport/FileSystem/SquashFS.pm b/installer/OpenSLX/OSExport/FileSystem/SquashFS.pm index d9760642..a092ddf0 100644 --- a/installer/OpenSLX/OSExport/FileSystem/SquashFS.pm +++ b/installer/OpenSLX/OSExport/FileSystem/SquashFS.pm @@ -41,7 +41,8 @@ sub initialize my $engine = shift; my $blockDevice = shift || confess('need to pass in block-device!'); - $self->{'engine'} = $engine; + $self->SUPER::initialize($engine); + $self->{'block-device'} = $blockDevice; my $exportBasePath = "$openslxConfig{'public-path'}/export"; $self->{'export-path'} = "$exportBasePath/sqfs/$engine->{'vendor-os-name'}"; |