diff options
43 files changed, 247 insertions, 54 deletions
diff --git a/bin/devel-tools/determineMinimumPackageSet.pl b/bin/devel-tools/determineMinimumPackageSet.pl index 193483ae..e2747674 100755 --- a/bin/devel-tools/determineMinimumPackageSet.pl +++ b/bin/devel-tools/determineMinimumPackageSet.pl @@ -11,6 +11,7 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- use strict; +use warnings; my $abstract = q[ determineMinimumPackageSet.pl @@ -61,12 +62,12 @@ sub slurpFile { my $file = shift; - if (!open(F, "< $file")) { - die _tr("could not open file '%s' for reading! (%s)", $file, $!); - } + my $fh; + open($fh, '<', $file) + or die _tr("could not open file '%s' for reading! (%s)", $file, $!); local $/ = undef; - my $text = <F>; - close(F); + my $text = <$fh>; + close($fh); return $text; } @@ -107,7 +108,11 @@ sub handlePackage ($rpmRes, $rpmOut) = callRpm(qq[rpm -q --provides "$pkgName"]); my $provides = join ' ', - map { s[^\s*(.+?)\s*$][$1]; qq["$_"]; } + map { + my $rpm = $_; + $rpm =~ s[^\s*(.+?)\s*$][$1]; + qq["$rpm"]; + } split "\n", $rpmOut; ($rpmRes, $rpmOut) = callRpm(qq[rpm -q --whatrequires $provides]); if ($rpmRes == 0) { @@ -138,6 +143,7 @@ sub determineMinimumPackageSet print "." unless $verbose; handlePackage($p); } + return; } __END__ diff --git a/bin/devel-tools/extractTranslations.pl b/bin/devel-tools/extractTranslations.pl index 9bef83c9..eab71f04 100755 --- a/bin/devel-tools/extractTranslations.pl +++ b/bin/devel-tools/extractTranslations.pl @@ -15,6 +15,7 @@ # and modules. # ----------------------------------------------------------------------------- use strict; +use warnings; my $abstract = q[ extractTranslations.pl @@ -32,6 +33,8 @@ use File::Find; use Getopt::Long; use Pod::Usage; +use OpenSLX::Utils; + my ( $helpReq, $show, @@ -86,11 +89,7 @@ sub ExtractTrStrings || $_ eq 'Translations' || $_ eq 'devel-tools'); return if -d; - open(F, "< $_") - or die "could not open file $_ for reading!"; - local $/ = undef; - my $text = <F>; - close(F); + my $text = slurpFile($_); if ($File::Find::name !~ m[\.pm$] && $text !~ m[^#!.+/perl]im) { # ignore anything other than perl-modules and -scripts return; @@ -129,11 +128,7 @@ sub UpdateTrModule print "updating $File::Find::name...\n"; my $trModule = $_; my $useKeyAsTranslation = ($trModule eq 'posix.pm'); - open(F, "< $trModule") - or die "could not open file $trModule for reading!"; - $/ = undef; - my $text = <F>; - close(F); + my $text = slurpFile($trModule); if ($text !~ m[%translations\s*=\s*\(\s*(.+)\s*\);]os) { print "\t*** No translations found - file will be skipped! ***\n"; return; @@ -188,10 +183,7 @@ sub UpdateTrModule [$updatedTranslations);]os; if ($newCount + $delCount) { chomp $text; - open(F, "> $trModule") - or die "could not open file $trModule for writing!"; - print F "$text\n"; - close(F); + spitFile($trModule, $text."\n"); print "\tadded $newCount strings, kept $keepCount and removed $delCount.\n"; } else { print "\tnothing changed\n"; diff --git a/bin/devel-tools/parseSusePatterns.pl b/bin/devel-tools/parseSusePatterns.pl index 8ccc13da..317a9c47 100755 --- a/bin/devel-tools/parseSusePatterns.pl +++ b/bin/devel-tools/parseSusePatterns.pl @@ -15,6 +15,7 @@ # SUSE-pattern-files (*.pat). # ----------------------------------------------------------------------------- use strict; +use warnings; my $abstract = q[ parseSusePatterns.pl @@ -61,13 +62,14 @@ sub parsePatternFile my $patternFile = shift; my $outmost = shift; - if (!open(PAT, "<$patternFile")) { + my $patFH; + if (!open($patFH, '<', $patternFile)) { return unless $outmost; die "unable to open $patternFile"; } undef $/; - my $content = <PAT>; - close(PAT); + my $content = <$patFH>; + close($patFH); $patternNames{$patternFile} = 1; if ($content =~ m[^\=Sum.de:\s*(.+?)\s*$]ms) { @@ -88,6 +90,7 @@ sub parsePatternFile if ($content =~ m[^\+Prc:\s*?$(.+?)^\-Prc:\s*?$]ms) { addPkgNames($1); } + return; } sub addSubPatterns @@ -96,7 +99,11 @@ sub addSubPatterns my @subPatterns = grep { length($_) > 0 } - map { $_ =~ s[^\s*(.+?)\s*$][$1]; $_ } + map { + my $pattern = $_; + $pattern =~ s[^\s*(.+?)\s*$][$1]; + $pattern; + } split "\n", $patternNames; foreach my $subPattern (@subPatterns) { @@ -105,6 +112,7 @@ sub addSubPatterns parsePatternFile($subPatternFile); } } + return; } sub addPkgNames @@ -113,15 +121,18 @@ sub addPkgNames my @pkgNames = grep { length($_) > 0 } - map { $_ =~ s[^\s*(.+?)\s*$][$1]; $_ } + map { + my $pkg = $_; + $pkg =~ s[^\s*(.+?)\s*$][$1]; + $pkg; + } split "\n", $pkgs; foreach my $pkgName (@pkgNames) { $packageNames{$pkgName} = 1; } + return; } -__END__ - =head1 NAME parseSusePatterns.pl - OpenSLX script to extract a package list from @@ -111,7 +111,7 @@ sub fetchLoaderConfigFile while (<$ldconfFH>) { chomp; if (/^\s*include\s+(.+?)\s*$/i) { - foreach my $incFile (<$rootPath$1>) { + while (my $incFile = <$rootPath$1>) { fetchLoaderConfigFile($incFile); } next; @@ -124,6 +124,7 @@ sub fetchLoaderConfigFile } close $ldconfFH or die(_tr("unable to close file '%s' (%s)", $ldConfFile, $!)); + return; } sub fetchLoaderConfig @@ -152,6 +153,7 @@ sub fetchLoaderConfig { push @libFolders, "$rootPath/usr/lib32"; } + return; } sub addLib @@ -200,6 +202,7 @@ sub addLib $libInfo{$lib} = $libPath; push @filesToDo, $libPath; } + return; } sub addLibsForBinary @@ -273,6 +276,7 @@ sub addLibsForBinary addLib($1, $bitwidth, $rpath); } } + return; } =head1 NAME diff --git a/bin/slxsettings b/bin/slxsettings index 278cb2c2..5aa0dfa3 100755 --- a/bin/slxsettings +++ b/bin/slxsettings @@ -161,7 +161,11 @@ sub changedHandler # invoke a key-specific change handler if it exists: $key =~ tr[-][_]; - eval { no strict 'refs'; "${key}_changed_handler"->(); }; + + no strict 'refs'; ## no critic (ProhibitNoStrict) + "${key}_changed_handler"->(); + + return; } sub private_path_changed_handler @@ -169,6 +173,8 @@ sub private_path_changed_handler # create the default config folders (for default system only): require OpenSLX::ConfigFolder; OpenSLX::ConfigFolder::createConfigFolderForDefaultSystem(); + + return; } =head1 NAME diff --git a/config-db/OpenSLX/ConfigDB.pm b/config-db/OpenSLX/ConfigDB.pm index e9940fd1..07da71c8 100644 --- a/config-db/OpenSLX/ConfigDB.pm +++ b/config-db/OpenSLX/ConfigDB.pm @@ -13,7 +13,7 @@ package OpenSLX::ConfigDB; use strict; use warnings; -our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $VERSION); +our (@ISA, @EXPORT_OK, %EXPORT_TAGS, $VERSION); $VERSION = 1; # API-version use Exporter; @@ -39,7 +39,6 @@ my @supportExports = qw( externalAttrName generatePlaceholderFor ); -@EXPORT = (); @EXPORT_OK = (@supportExports); %EXPORT_TAGS = ('support' => [@supportExports],); @@ -115,6 +114,7 @@ sub _checkAndUpgradeDBSchemaIfNecessary } else { vlog(1, _tr('DB matches current schema version %s', $currVersion)); } + return; } sub _aref @@ -141,7 +141,7 @@ sub new return bless $self, $class; } -sub connect +sub connect ## no critic (ProhibitBuiltinHomonyms) { my $self = shift; my $dbParams = shift; @@ -196,6 +196,7 @@ sub connect } _checkAndUpgradeDBSchemaIfNecessary($metaDB); + return; } sub disconnect @@ -203,6 +204,7 @@ sub disconnect my $self = shift; $self->{'meta-db'}->disconnect(); + return; } sub start_transaction @@ -210,6 +212,7 @@ sub start_transaction my $self = shift; $self->{'meta-db'}->start_transaction(); + return; } sub commit_transaction @@ -217,6 +220,7 @@ sub commit_transaction my $self = shift; $self->{'meta-db'}->commit_transaction(); + return; } sub rollback_transaction @@ -224,6 +228,7 @@ sub rollback_transaction my $self = shift; $self->{'meta-db'}->rollback_transaction(); + return; } sub fetchVendorOSByFilter @@ -829,6 +834,7 @@ sub emptyDatabase my @vendorOSIDs = map { $_->{id} } grep { $_->{id} > 0 } $self->fetchVendorOSByFilter(); $self->removeVendorOS(\@vendorOSIDs); + return; } ################################################################################ @@ -845,6 +851,7 @@ sub mergeDefaultAttributesIntoSystem my $defaultClient = $self->fetchClientByID(0); pushAttributes($system, $defaultClient); + return; } sub mergeDefaultAndGroupAttributesIntoClient @@ -869,6 +876,7 @@ sub mergeDefaultAndGroupAttributesIntoClient vlog(3, _tr('merging from default client...')); my $defaultClient = $self->fetchClientByID(0); mergeAttributes($client, $defaultClient); + return; } sub aggregatedSystemIDsOfClient @@ -991,6 +999,7 @@ sub mergeAttributes $target->{$key} = $sourceVal; } } + return; } sub pushAttributes @@ -1005,6 +1014,7 @@ sub pushAttributes $target->{$key} = $sourceVal; } } + return; } sub externalIDForSystem diff --git a/config-db/OpenSLX/DBSchema.pm b/config-db/OpenSLX/DBSchema.pm index 1454390a..e4263a9b 100644 --- a/config-db/OpenSLX/DBSchema.pm +++ b/config-db/OpenSLX/DBSchema.pm @@ -345,3 +345,4 @@ if ($lang =~ m[^\w\w_(\w\w)]) { ], ); +1; diff --git a/config-db/OpenSLX/MetaDB/Base.pm b/config-db/OpenSLX/MetaDB/Base.pm index 2aa1c3f2..3f03fbed 100644 --- a/config-db/OpenSLX/MetaDB/Base.pm +++ b/config-db/OpenSLX/MetaDB/Base.pm @@ -28,7 +28,7 @@ sub new confess "Don't create OpenSLX::MetaDB::Base - objects directly!"; } -sub connect +sub connect ## no critic (ProhibitBuiltinHomonyms) { } @@ -124,7 +124,7 @@ sub generateNextIdForTable # NB: if this method is called without a tablename, it returns: # 1 if this backend requires manual ID generation # 0 if not. - return undef; + return; } sub addVendorOS diff --git a/config-db/OpenSLX/MetaDB/CSV.pm b/config-db/OpenSLX/MetaDB/CSV.pm index ef96833a..0ef9ab93 100644 --- a/config-db/OpenSLX/MetaDB/CSV.pm +++ b/config-db/OpenSLX/MetaDB/CSV.pm @@ -38,7 +38,7 @@ sub new return bless $self, $class; } -sub connect +sub connect ## no critic (ProhibitBuiltinHomonyms) { my $self = shift; @@ -55,6 +55,7 @@ sub connect $self->{'dbh'} = DBI->connect("dbi:CSV:$dbSpec", undef, undef, {PrintError => 0}) or die _tr("Cannot connect to database '%s' (%s)", $dbSpec, $DBI::errstr); + return; } sub quote @@ -78,6 +79,7 @@ sub start_transaction $self->{"transaction-lock"} = *TRANSFILE; flock(TRANSFILE, LOCK_EX) or confess _tr(q[Can't lock transaction-file '%s' (%s)], $lockFile, $!); + return; } sub commit_transaction @@ -150,6 +152,7 @@ sub schemaDeclareTable my $dbh = $self->{'dbh'}; $dbh->{'csv_tables'}->{"$table"} = {'file' => "${table}.csv"}; + return; } sub schemaRenameTable @@ -162,6 +165,7 @@ sub schemaRenameTable $self->SUPER::schemaRenameTable($oldTable, $newTable, @_); my $dbh = $self->{'dbh'}; rename "$dbh->{'f_dir'}/id-$oldTable", "$dbh->{'f_dir'}/id-$newTable"; + return; } sub schemaDropTable @@ -172,6 +176,7 @@ sub schemaDropTable $self->SUPER::schemaDropTable($table, @_); my $dbh = $self->{'dbh'}; unlink "$dbh->{'f_dir'}/id-$table"; + return; } 1; diff --git a/config-db/OpenSLX/MetaDB/DBI.pm b/config-db/OpenSLX/MetaDB/DBI.pm index 91d774c7..470fa5c7 100644 --- a/config-db/OpenSLX/MetaDB/DBI.pm +++ b/config-db/OpenSLX/MetaDB/DBI.pm @@ -35,6 +35,7 @@ sub disconnect $self->{'dbh'}->disconnect; $self->{'dbh'} = undef; + return; } sub quote @@ -669,6 +670,7 @@ sub setSystemIDsOfClient my @currSystems = $self->fetchSystemIDsOfClient($clientID); $self->_updateRefTable('client_system_ref', $clientID, $systemIDs, 'client_id', 'system_id', \@currSystems); + return; } sub setGroupIDsOfClient @@ -680,6 +682,7 @@ sub setGroupIDsOfClient my @currGroups = $self->fetchGroupIDsOfClient($clientID); $self->_updateRefTable('group_client_ref', $clientID, $groupIDs, 'client_id', 'group_id', \@currGroups); + return; } sub addGroup @@ -716,6 +719,7 @@ sub setClientIDsOfGroup my @currClients = $self->fetchClientIDsOfGroup($groupID); $self->_updateRefTable('group_client_ref', $groupID, $clientIDs, 'group_id', 'client_id', \@currClients); + return; } sub setSystemIDsOfGroup @@ -727,6 +731,7 @@ sub setSystemIDsOfGroup my @currSystems = $self->fetchSystemIDsOfGroup($groupID); $self->_updateRefTable('group_system_ref', $groupID, $systemIDs, 'group_id', 'system_id', \@currSystems); + return; } ################################################################################ @@ -826,6 +831,7 @@ sub schemaAddTable # don't care about IDs if there's no 'id' column in this table $self->_doInsert($table, $initialVals, $ignoreIDs); } + return; } sub schemaDropTable @@ -840,6 +846,7 @@ sub schemaDropTable vlog(3, $sql); $dbh->do($sql) or confess _tr(q[Can't drop table <%s> (%s)], $table, $dbh->errstr); + return; } sub schemaRenameTable @@ -871,6 +878,7 @@ sub schemaRenameTable vlog(3, $sql); $dbh->do($sql) or confess _tr(q[Can't drop table <%s> (%s)], $oldTable, $dbh->errstr); + return; } sub schemaAddColumns @@ -912,6 +920,7 @@ sub schemaAddColumns $self->schemaDropTable($table, 1); $self->schemaRenameTable($tempTable, $table, $colDescrs, 1); + return; } sub schemaDropColumns @@ -944,6 +953,7 @@ sub schemaDropColumns $self->schemaDropTable($table, 1); $self->schemaRenameTable($tempTable, $table, $colDescrs, 1); + return; } sub schemaChangeColumns @@ -985,6 +995,7 @@ sub schemaChangeColumns $self->schemaDropTable($table, 1); $self->schemaRenameTable($tempTable, $table, $colDescrs, 1); + return; } 1; diff --git a/config-db/OpenSLX/MetaDB/SQLite.pm b/config-db/OpenSLX/MetaDB/SQLite.pm index d6681ce6..f6b395d0 100644 --- a/config-db/OpenSLX/MetaDB/SQLite.pm +++ b/config-db/OpenSLX/MetaDB/SQLite.pm @@ -35,7 +35,7 @@ sub new return bless $self, $class; } -sub connect +sub connect ## no critic (ProhibitBuiltinHomonyms) { my $self = shift; @@ -70,6 +70,7 @@ sub schemaRenameTable vlog(3, $sql); $dbh->do($sql) or croak(_tr(q[Can't rename table <%s> (%s)], $oldTable, $dbh->errstr)); + return; } sub schemaAddColumns @@ -98,6 +99,7 @@ sub schemaAddColumns if (defined $newColDefaultVals) { $self->_doUpdate($table, undef, $newColDefaultVals); } + return; } 1; diff --git a/config-db/OpenSLX/MetaDB/mysql.pm b/config-db/OpenSLX/MetaDB/mysql.pm index 769506d1..03272331 100644 --- a/config-db/OpenSLX/MetaDB/mysql.pm +++ b/config-db/OpenSLX/MetaDB/mysql.pm @@ -35,7 +35,7 @@ sub new return bless $self, $class; } -sub connect +sub connect ## no critic (ProhibitBuiltinHomonyms) { my $self = shift; @@ -49,6 +49,7 @@ sub connect $self->{'dbh'} = DBI->connect("dbi:mysql:$dbSpec", $user, '', {PrintError => 0}) or die _tr("Cannot connect to database <%s> (%s)", $dbSpec, $DBI::errstr); + return; } sub schemaConvertTypeDescrToNative @@ -85,6 +86,7 @@ sub schemaRenameTable vlog(3, $sql); $dbh->do($sql) or confess _tr(q[Can't rename table <%s> (%s)], $oldTable, $dbh->errstr); + return; } sub schemaAddColumns @@ -111,6 +113,7 @@ sub schemaAddColumns if (defined $newColDefaultVals) { $self->_doUpdate($table, undef, $newColDefaultVals); } + return; } sub schemaDropColumns @@ -132,6 +135,7 @@ sub schemaDropColumns $dbh->do($sql) or confess _tr(q[Can't drop columns from table <%s> (%s)], $table, $dbh->errstr); + return; } sub schemaChangeColumns @@ -156,5 +160,7 @@ sub schemaChangeColumns $dbh->do($sql) or confess _tr(q[Can't change columns in table <%s> (%s)], $table, $dbh->errstr); + return; } + 1; diff --git a/config-db/slxconfig b/config-db/slxconfig index 58a06d9f..94ebc13a 100755 --- a/config-db/slxconfig +++ b/config-db/slxconfig @@ -109,8 +109,6 @@ Try '%s --help' for more info.\n", $0); $openslxDB->disconnect(); -exit; - sub parseKeyValueArgs { my $allowedKeys = shift; @@ -154,8 +152,9 @@ sub dumpElements ); } } else { - print join('', sort map &$nameClause, @_); + print join('', sort map { $nameClause->($_); } @_); } + return; } sub listClients @@ -182,6 +181,7 @@ sub listClients sort { $a->{name} cmp $b->{name} } $openslxDB->fetchClientByFilter($clientData) ); + return; } sub listExports @@ -210,6 +210,7 @@ sub listExports sort { $a->{name} eq $b->{name} || $a->{type} cmp $b->{type} } $openslxDB->fetchExportByFilter($exportData) ); + return; } sub listSystems @@ -240,6 +241,7 @@ sub listSystems sort { $a->{name} cmp $b->{name} } $openslxDB->fetchSystemByFilter($systemData) ); + return; } sub listVendorOSes @@ -255,6 +257,7 @@ sub listVendorOSes dumpElements('vendor-OS', undef, sort { $a->{name} cmp $b->{name} } $openslxDB->fetchVendorOSByFilter($vendorOSData)); + return; } sub addClientToConfigDB @@ -311,6 +314,7 @@ sub addClientToConfigDB if ($verbose) { listClients("id=$clientID"); } + return; } sub addSystemToConfigDB @@ -397,6 +401,7 @@ sub addSystemToConfigDB if ($verbose) { listSystems("id=$systemID"); } + return; } sub changeClientInConfigDB @@ -473,6 +478,7 @@ sub changeClientInConfigDB if ($verbose) { listClients("id=$client->{id}"); } + return; } sub changeSystemInConfigDB @@ -543,6 +549,7 @@ sub changeSystemInConfigDB if ($verbose) { listSystems("id=$system->{id}"); } + return; } sub removeClientFromConfigDB @@ -566,6 +573,7 @@ sub removeClientFromConfigDB $openslxDB->removeClient($client->{id}); vlog(0, _tr("client '%s' has been successfully removed from DB\n", $clientName)); + return; } sub removeSystemFromConfigDB @@ -589,10 +597,9 @@ sub removeSystemFromConfigDB $openslxDB->removeSystem($system->{id}); vlog(0, _tr("system '%s' has been successfully removed from DB\n", $systemName)); + return; } - - =head1 NAME slxconfig - OpenSLX-script to view & change the configurational database diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer index 54bcf4f3..91a79849 100755 --- a/config-db/slxconfig-demuxer +++ b/config-db/slxconfig-demuxer @@ -191,8 +191,9 @@ sub unlockScript return if $dryRun; close(LOCKFILE); - unlink $lockFile; + + return; } sub folderContainsFiles @@ -262,6 +263,7 @@ sub writeAttributesToFile vlog(0, $content); vlog(0, "--- END OF $fileName --- "); } + return; } sub writeSlxConfigToFile @@ -276,6 +278,7 @@ sub writeSlxConfigToFile $content .= qq[$key="$slxConf->{$key}"\n]; } spitFile($fileName, $content); + return; } sub copyExternalSystemConfig @@ -316,6 +319,7 @@ sub copyExternalSystemConfig slxsystem("cp -a $clientSpecConfigPath/* $targetPath"); } } + return; } sub createTarOfPath @@ -404,6 +408,7 @@ sub writePXEMenus close($pxeFH) or croak _tr("unable to close file '%s' (%s)\n", $pxeFile, $!); } + return; } sub generateInitalRamFS @@ -465,6 +470,7 @@ sub generateInitalRamFS # ... finally invoke mkdxsinitrd: slxsystem($cmd) unless $dryRun; + return; } sub writeSystemPXEFiles @@ -488,6 +494,7 @@ sub writeSystemPXEFiles sprintf("initramfs-%d", $vendorOSInitramfsMap{$info->{'vendor-os'}->{id}}); generateInitalRamFS($info, $pxeVendorOSPath); + return; } sub writeDhcpConfig @@ -501,6 +508,7 @@ sub writeDhcpConfig my $dhcpBackend = $dhcpModule->new(); my @clients = $openslxDB->fetchClientByFilter(); $dhcpBackend->execute(\@clients); + return; } sub writeClientConfigurationsForSystem @@ -563,6 +571,7 @@ sub writeClientConfigurationsForSystem "$tftpbootPath/client-config/$info->{'external-id'}"); } } + return; } sub writePluginConfigurationsForSystem @@ -617,6 +626,7 @@ sub writePluginConfigurationsForSystem ); } } + return; } sub writeSystemConfiguration @@ -648,6 +658,7 @@ sub writeSystemConfiguration writeClientConfigurationsForSystem($info, $buildPath, $attrFile); slxsystem("rm -rf $buildPath") unless $dryRun; + return; } sub writeConfigurations @@ -673,6 +684,7 @@ sub writeConfigurations if (defined $dhcpType) { writeDhcpConfig(); } + return; } =head1 NAME diff --git a/installer/OpenSLX/OSExport/BlockDevice/AoE.pm b/installer/OpenSLX/OSExport/BlockDevice/AoE.pm index 2113ef5c..b0439a6d 100644 --- a/installer/OpenSLX/OSExport/BlockDevice/AoE.pm +++ b/installer/OpenSLX/OSExport/BlockDevice/AoE.pm @@ -49,6 +49,7 @@ sub initialize $self->{'engine'} = $engine; $self->{'fs'} = $fs; + return; } sub getExportPort @@ -90,6 +91,7 @@ sub showExportConfigInfo "... (don't know how this is done yet)" ); print(('#' x 80) . "\n"); + return; } 1; diff --git a/installer/OpenSLX/OSExport/BlockDevice/NBD.pm b/installer/OpenSLX/OSExport/BlockDevice/NBD.pm index 89f10b66..1199a4dc 100644 --- a/installer/OpenSLX/OSExport/BlockDevice/NBD.pm +++ b/installer/OpenSLX/OSExport/BlockDevice/NBD.pm @@ -43,6 +43,7 @@ sub initialize $self->{'engine'} = $engine; $self->{'fs'} = $fs; + return; } sub getExportPort @@ -84,6 +85,7 @@ sub showExportConfigInfo "nbd-server $export->{port} $self->{fs}->{'export-path'} -r" ); print(('#' x 80) . "\n"); + return; } 1; diff --git a/installer/OpenSLX/OSExport/Distro/Any.pm b/installer/OpenSLX/OSExport/Distro/Any.pm index 976bbadf..f56673d8 100644 --- a/installer/OpenSLX/OSExport/Distro/Any.pm +++ b/installer/OpenSLX/OSExport/Distro/Any.pm @@ -54,6 +54,7 @@ sub initDistroInfo + /lib/modules/*/misc/vmnet.o + /lib/modules/*/misc/vmmon.o "; + return; } 1;
\ No newline at end of file diff --git a/installer/OpenSLX/OSExport/Distro/Base.pm b/installer/OpenSLX/OSExport/Distro/Base.pm index f1986ee5..67d18951 100644 --- a/installer/OpenSLX/OSExport/Distro/Base.pm +++ b/installer/OpenSLX/OSExport/Distro/Base.pm @@ -37,6 +37,7 @@ sub initialize $self->{'engine'} = $engine; $self->initDistroInfo(); + return; } sub initDistroInfo diff --git a/installer/OpenSLX/OSExport/Distro/Debian.pm b/installer/OpenSLX/OSExport/Distro/Debian.pm index 5f161902..5ff7216a 100644 --- a/installer/OpenSLX/OSExport/Distro/Debian.pm +++ b/installer/OpenSLX/OSExport/Distro/Debian.pm @@ -48,6 +48,7 @@ sub initDistroInfo - /boot/initrd* - /boot/grub "; + return; } 1;
\ No newline at end of file diff --git a/installer/OpenSLX/OSExport/Distro/Fedora.pm b/installer/OpenSLX/OSExport/Distro/Fedora.pm index 0ef3e028..3e5d1f31 100644 --- a/installer/OpenSLX/OSExport/Distro/Fedora.pm +++ b/installer/OpenSLX/OSExport/Distro/Fedora.pm @@ -54,6 +54,7 @@ sub initDistroInfo - *.rpmsave - *.rpmnew "; + return; } 1;
\ No newline at end of file diff --git a/installer/OpenSLX/OSExport/Distro/Gentoo.pm b/installer/OpenSLX/OSExport/Distro/Gentoo.pm index 4d908650..e4bcd6db 100644 --- a/installer/OpenSLX/OSExport/Distro/Gentoo.pm +++ b/installer/OpenSLX/OSExport/Distro/Gentoo.pm @@ -48,6 +48,7 @@ sub initDistroInfo - /boot/initrd* - /boot/grub "; + return; } 1;
\ No newline at end of file diff --git a/installer/OpenSLX/OSExport/Distro/SUSE.pm b/installer/OpenSLX/OSExport/Distro/SUSE.pm index 1f826159..3dbf6e76 100644 --- a/installer/OpenSLX/OSExport/Distro/SUSE.pm +++ b/installer/OpenSLX/OSExport/Distro/SUSE.pm @@ -96,6 +96,7 @@ sub initDistroInfo - *.rpmnew - *.YaST2save "; + return; } 1; diff --git a/installer/OpenSLX/OSExport/Distro/Ubuntu.pm b/installer/OpenSLX/OSExport/Distro/Ubuntu.pm index 8dbaae9e..f436c533 100644 --- a/installer/OpenSLX/OSExport/Distro/Ubuntu.pm +++ b/installer/OpenSLX/OSExport/Distro/Ubuntu.pm @@ -50,6 +50,7 @@ sub initDistroInfo - /boot/initrd* - /boot/grub "; + return; } 1;
\ No newline at end of file diff --git a/installer/OpenSLX/OSExport/Engine.pm b/installer/OpenSLX/OSExport/Engine.pm index 31a71b5a..ad0c0c0a 100644 --- a/installer/OpenSLX/OSExport/Engine.pm +++ b/installer/OpenSLX/OSExport/Engine.pm @@ -86,6 +86,7 @@ sub initializeFromExisting $self->_initialize($vendorOS->{name}, $vendorOS->{id}, $export->{name}, $export->{type}); + return; } sub initializeForNew @@ -108,6 +109,7 @@ sub initializeForNew $self->_initialize($vendorOS->{name}, $vendorOS->{id}, $exportName, $exportType); + return; } sub exportVendorOS @@ -130,6 +132,7 @@ sub exportVendorOS ) ); $self->_addExportToConfigDB(); + return; } sub purgeExport @@ -146,6 +149,7 @@ sub purgeExport ); } $self->_removeExportFromConfigDB(); + return; } sub generateExportURI @@ -238,6 +242,7 @@ sub _initialize $exporter->{'export-path'} ) ); + return; } sub _addExportToConfigDB @@ -285,6 +290,7 @@ sub _addExportToConfigDB } $openslxDB->disconnect(); + return; } sub _removeExportFromConfigDB @@ -325,6 +331,7 @@ sub _removeExportFromConfigDB } $openslxDB->disconnect(); + return; } 1; diff --git a/installer/OpenSLX/OSExport/FileSystem/NFS.pm b/installer/OpenSLX/OSExport/FileSystem/NFS.pm index 0073d55c..878b956b 100644 --- a/installer/OpenSLX/OSExport/FileSystem/NFS.pm +++ b/installer/OpenSLX/OSExport/FileSystem/NFS.pm @@ -43,6 +43,7 @@ sub initialize $self->{'engine'} = $engine; my $exportBasePath = "$openslxConfig{'public-path'}/export"; $self->{'export-path'} = "$exportBasePath/nfs/$engine->{'vendor-os-name'}"; + return; } sub exportVendorOS @@ -52,6 +53,7 @@ sub exportVendorOS my $target = $self->{'export-path'}; $self->_copyViaRsync($source, $target); + return; } sub purgeExport @@ -101,6 +103,7 @@ sub showExportConfigInfo # TODO : add something a bit more clever here... # my $exports = slurpFile("/etc/exports"); + return; } ################################################################################ @@ -126,6 +129,7 @@ sub _copyViaRsync close($rsyncFH) or die _tr("unable to export to target '%s', giving up! (%s)", $target, $!); + return; } sub _determineIncludeExcludeList diff --git a/installer/OpenSLX/OSExport/FileSystem/SquashFS.pm b/installer/OpenSLX/OSExport/FileSystem/SquashFS.pm index 6aeb9cd2..82c4fdda 100644 --- a/installer/OpenSLX/OSExport/FileSystem/SquashFS.pm +++ b/installer/OpenSLX/OSExport/FileSystem/SquashFS.pm @@ -45,6 +45,7 @@ sub initialize $self->{'block-device'} = $blockDevice; my $exportBasePath = "$openslxConfig{'public-path'}/export"; $self->{'export-path'} = "$exportBasePath/sqfs/$engine->{'vendor-os-name'}"; + return; } sub exportVendorOS @@ -74,6 +75,7 @@ sub exportVendorOS $self->_createSquashFS($source, $target, $includeExcludeList); } $self->_addBlockDeviceTagToExport($target); + return; } sub purgeExport @@ -176,6 +178,7 @@ sub showExportConfigInfo my $export = shift; $self->{'block-device'}->showExportConfigInfo($export); + return; } ################################################################################ @@ -317,6 +320,7 @@ sub _addBlockDeviceTagToExport my $tagName = "$target" . '@' . lc($self->{'block-device'}->{name}); linkFile(basename($target), $tagName); + return; } sub _removeBlockDeviceTagFromExport diff --git a/installer/OpenSLX/OSSetup/Distro/Base.pm b/installer/OpenSLX/OSSetup/Distro/Base.pm index e0cb5fba..0cea7ab6 100644 --- a/installer/OpenSLX/OSSetup/Distro/Base.pm +++ b/installer/OpenSLX/OSSetup/Distro/Base.pm @@ -109,6 +109,7 @@ sub initialize "; $self->initDistroInfo(); + return; } sub fixPrerequiredFiles diff --git a/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm b/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm index 24ad00a4..30882c8d 100644 --- a/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm +++ b/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm @@ -40,14 +40,15 @@ sub initialize $self->SUPER::initialize($engine); $self->{'packager-type'} = 'dpkg'; $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'apt'; - $self->{'stage1c-faked-files'} = [ - ]; + $self->{'stage1c-faked-files'} = []; + return; } sub fixPrerequiredFiles { my $self = shift; my $stage1cDir = shift; + return; } sub initDistroInfo @@ -80,7 +81,8 @@ sub initDistroInfo $self->{config}->{'selection'} = { 'default' => "list any packagenames here", - } + }; + return; } 1;
\ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm b/installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm index f4e8a6e4..23ca8a77 100644 --- a/installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm +++ b/installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm @@ -40,14 +40,15 @@ sub initialize $self->SUPER::initialize($engine); $self->{'packager-type'} = 'dpkg'; $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'apt'; - $self->{'stage1c-faked-files'} = [ - ]; + $self->{'stage1c-faked-files'} = []; + return; } sub fixPrerequiredFiles { my $self = shift; my $stage1cDir = shift; + return; } sub initDistroInfo @@ -80,7 +81,8 @@ sub initDistroInfo $self->{config}->{'selection'} = { 'default' => "list any packagenames here", - } + }; + return; } 1;
\ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/Distro/Fedora_6.pm b/installer/OpenSLX/OSSetup/Distro/Fedora_6.pm index 03f7116a..6b384ebd 100644 --- a/installer/OpenSLX/OSSetup/Distro/Fedora_6.pm +++ b/installer/OpenSLX/OSSetup/Distro/Fedora_6.pm @@ -44,6 +44,7 @@ sub initialize '/etc/fstab', '/etc/mtab', ]; + return; } sub initDistroInfo @@ -167,7 +168,8 @@ sub initDistroInfo $self->{config}->{'selection'} = { 'default' => "", - } + }; + return; } 1;
\ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/Distro/Fedora_6_x86_64.pm b/installer/OpenSLX/OSSetup/Distro/Fedora_6_x86_64.pm index 46c43e37..a4addcdb 100644 --- a/installer/OpenSLX/OSSetup/Distro/Fedora_6_x86_64.pm +++ b/installer/OpenSLX/OSSetup/Distro/Fedora_6_x86_64.pm @@ -44,6 +44,7 @@ sub initialize '/etc/fstab', '/etc/mtab', ]; + return; } sub initDistroInfo @@ -167,7 +168,8 @@ sub initDistroInfo $self->{config}->{'selection'} = { 'default' => "", - } + }; + return; } 1; diff --git a/installer/OpenSLX/OSSetup/Distro/SUSE_10_1.pm b/installer/OpenSLX/OSSetup/Distro/SUSE_10_1.pm index 819bbb95..b25b167d 100644 --- a/installer/OpenSLX/OSSetup/Distro/SUSE_10_1.pm +++ b/installer/OpenSLX/OSSetup/Distro/SUSE_10_1.pm @@ -41,6 +41,7 @@ sub initialize $self->{'packager-type'} = 'rpm'; $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'smart'; $ENV{YAST_IS_RUNNING} = "instsys"; + return; } sub fixPrerequiredFiles @@ -50,6 +51,7 @@ sub fixPrerequiredFiles chown(0, 0, "$stage1cDir/etc/group", "$stage1cDir/etc/passwd", "$stage1cDir/etc/shadow"); + return; } sub updateDistroConfig @@ -65,6 +67,7 @@ sub updateDistroConfig die _tr("unable to run SuSEconfig (%s)", $!); } $self->SUPER::updateDistroConfig(); + return; } sub initDistroInfo @@ -1054,6 +1057,7 @@ sub initDistroInfo zvbi ", }; + return; } 1;
\ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/Distro/SUSE_10_1_x86_64.pm b/installer/OpenSLX/OSSetup/Distro/SUSE_10_1_x86_64.pm index f80bca32..91210146 100644 --- a/installer/OpenSLX/OSSetup/Distro/SUSE_10_1_x86_64.pm +++ b/installer/OpenSLX/OSSetup/Distro/SUSE_10_1_x86_64.pm @@ -41,6 +41,7 @@ sub initialize $self->{'packager-type'} = 'rpm'; $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'smart'; $ENV{YAST_IS_RUNNING} = "instsys"; + return; } sub fixPrerequiredFiles @@ -50,6 +51,7 @@ sub fixPrerequiredFiles chown(0, 0, "$stage1cDir/etc/group", "$stage1cDir/etc/passwd", "$stage1cDir/etc/shadow"); + return; } sub updateDistroConfig @@ -65,6 +67,7 @@ sub updateDistroConfig die _tr("unable to run SuSEconfig (%s)", $!); } $self->SUPER::updateDistroConfig(); + return; } sub initDistroInfo @@ -1055,6 +1058,7 @@ sub initDistroInfo zvbi ", }; + return; } 1; diff --git a/installer/OpenSLX/OSSetup/Distro/SUSE_10_2.pm b/installer/OpenSLX/OSSetup/Distro/SUSE_10_2.pm index 497980cb..71f4b57b 100644 --- a/installer/OpenSLX/OSSetup/Distro/SUSE_10_2.pm +++ b/installer/OpenSLX/OSSetup/Distro/SUSE_10_2.pm @@ -39,6 +39,7 @@ sub initialize $self->{'packager-type'} = 'rpm'; $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'smart'; $ENV{YAST_IS_RUNNING} = "instsys"; + return; } sub fixPrerequiredFiles @@ -48,6 +49,7 @@ sub fixPrerequiredFiles chown(0, 0, "$stage1cDir/etc/group", "$stage1cDir/etc/passwd", "$stage1cDir/etc/shadow"); + return; } sub updateDistroConfig @@ -63,6 +65,7 @@ sub updateDistroConfig die _tr("unable to run SuSEconfig (%s)", $!); } $self->SUPER::updateDistroConfig(); + return; } sub initDistroInfo @@ -1140,6 +1143,7 @@ sub initDistroInfo zvbi ", }; + return; } 1; diff --git a/installer/OpenSLX/OSSetup/Distro/SUSE_10_2_x86_64.pm b/installer/OpenSLX/OSSetup/Distro/SUSE_10_2_x86_64.pm index 778d58af..85715e40 100644 --- a/installer/OpenSLX/OSSetup/Distro/SUSE_10_2_x86_64.pm +++ b/installer/OpenSLX/OSSetup/Distro/SUSE_10_2_x86_64.pm @@ -41,6 +41,7 @@ sub initialize $self->{'packager-type'} = 'rpm'; $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'smart'; $ENV{YAST_IS_RUNNING} = "instsys"; + return; } sub fixPrerequiredFiles @@ -50,6 +51,7 @@ sub fixPrerequiredFiles chown(0, 0, "$stage1cDir/etc/group", "$stage1cDir/etc/passwd", "$stage1cDir/etc/shadow"); + return; } sub updateDistroConfig @@ -65,6 +67,7 @@ sub updateDistroConfig die _tr("unable to run SuSEconfig (%s)", $!); } $self->SUPER::updateDistroConfig(); + return; } sub initDistroInfo @@ -395,7 +398,8 @@ sub initDistroInfo zisofs-tools zsh ", - } + }; + return; } 1;
\ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm index 6846eef6..82ab6163 100644 --- a/installer/OpenSLX/OSSetup/Engine.pm +++ b/installer/OpenSLX/OSSetup/Engine.pm @@ -111,6 +111,7 @@ sub DESTROY kill TERM => $pid; } } + return; } sub initialize @@ -206,6 +207,7 @@ sub initialize $self->createPackager(); $self->createMetaPackager(); } + return; } sub installVendorOS @@ -264,6 +266,7 @@ sub installVendorOS $self->touchVendorOS(); $self->addInstalledVendorOSToConfigDB(); + return; } sub cloneVendorOS @@ -346,6 +349,7 @@ sub cloneVendorOS $self->touchVendorOS(); $self->addInstalledVendorOSToConfigDB(); + return; } sub updateVendorOS @@ -371,6 +375,7 @@ sub updateVendorOS 0, _tr("Vendor-OS '%s' updated succesfully.\n", $self->{'vendor-os-name'}) ); + return; } sub startChrootedShellForVendorOS @@ -401,6 +406,7 @@ sub startChrootedShellForVendorOS $self->{'vendor-os-name'} ) ); + return; } sub callChrootedFunctionForVendorOS @@ -432,6 +438,7 @@ sub callChrootedFunctionForVendorOS $self->{'vendor-os-name'} ) ); + return; } sub removeVendorOS @@ -458,6 +465,7 @@ sub removeVendorOS ); } $self->removeVendorOSFromConfigDB(); + return; } sub addInstalledVendorOSToConfigDB @@ -517,6 +525,7 @@ sub addInstalledVendorOSToConfigDB } $openslxDB->disconnect(); + return; } sub removeVendorOSFromConfigDB @@ -563,6 +572,7 @@ sub removeVendorOSFromConfigDB } $openslxDB->disconnect(); + return; } ################################################################################ @@ -643,6 +653,7 @@ sub readDistroInfo } } } + return; } sub createVendorOSPath @@ -653,6 +664,7 @@ sub createVendorOSPath die _tr("unable to create directory '%s', giving up! (%s)\n", $self->{'vendor-os-path'}, $!); } + return; } sub touchVendorOS @@ -663,6 +675,7 @@ sub touchVendorOS # 'age' of the vendor-OS when trying to determine whether or not we # need to re-export this vendor-OS: slxsystem("touch $self->{'vendor-os-path'}"); + return; } sub createPackager @@ -674,6 +687,7 @@ sub createPackager my $packager = instantiateClass($packagerClass); $packager->initialize($self); $self->{'packager'} = $packager; + return; } sub createMetaPackager @@ -695,6 +709,7 @@ sub createMetaPackager my $metaPackager = instantiateClass($metaPackagerClass); $metaPackager->initialize($self); $self->{'meta-packager'} = $metaPackager; + return; } sub sortRepositoryURLs @@ -812,6 +827,7 @@ sub startLocalURLServersAsNeeded $port++; } } + return; } sub setupStage1A @@ -837,6 +853,7 @@ sub setupStage1A $self->stage1A_copyPrerequiredFiles(); $self->stage1A_copyTrustedPackageKeys(); $self->stage1A_createRequiredFiles(); + return; } sub stage1A_createBusyboxEnvironment @@ -892,6 +909,7 @@ sub stage1A_createBusyboxEnvironment } $self->stage1A_setupResolver($libcFolder); + return; } sub stage1A_setupResolver @@ -911,6 +929,7 @@ sub stage1A_setupResolver my $stage1cDir = "$self->{'stage1aDir'}/$self->{'stage1bSubdir'}/$self->{'stage1cSubdir'}"; copyFile('/etc/resolv.conf', "$stage1cDir/etc"); + return; } sub stage1A_copyPrerequiredFiles @@ -933,6 +952,7 @@ sub stage1A_copyPrerequiredFiles ); } $self->{distro}->fixPrerequiredFiles($stage1cDir); + return; } sub stage1A_copyTrustedPackageKeys @@ -964,6 +984,7 @@ sub stage1A_copyTrustedPackageKeys copyFile("$keyDir/pubring.gpg", "$stage1cDir/usr/lib/rpm/gnupg"); } } + return; } sub stage1A_createRequiredFiles @@ -992,6 +1013,7 @@ sub stage1A_createRequiredFiles "unable to create node '%s' (%s)\n", "$stage1cDir/dev/null", $! ); } + return; } sub setupStage1B @@ -1000,6 +1022,7 @@ sub setupStage1B vlog(1, "setting up stage1b for $self->{'vendor-os-name'}..."); $self->stage1B_chrootAndBootstrap(); + return; } sub stage1B_chrootAndBootstrap @@ -1039,6 +1062,7 @@ sub stage1B_chrootAndBootstrap my @bootstrapPkgs = $self->downloadBaseFiles(\@pkgs); my @allPkgs = (@prereqPkgs, @bootstrapPrereqPkgs, @bootstrapPkgs); $self->{'bootstrap-packages'} = \@allPkgs; + return; } sub setupStage1C @@ -1047,6 +1071,7 @@ sub setupStage1C vlog(1, "setting up stage1c for $self->{'vendor-os-name'}..."); $self->stage1C_chrootAndInstallBasicVendorOS(); + return; } sub stage1C_chrootAndInstallBasicVendorOS @@ -1080,6 +1105,7 @@ sub stage1C_chrootAndInstallBasicVendorOS $self->{packager}->installPackages( $self->{'bootstrap-packages'}, $stage1cDir ); + return; } sub stage1C_cleanupBasicVendorOS @@ -1100,6 +1126,7 @@ sub stage1C_cleanupBasicVendorOS $self->{stage1aDir}, $! ); } + return; } sub setupStage1D @@ -1113,6 +1140,7 @@ sub setupStage1D $self->stage1D_setupPackageSources(); $self->stage1D_updateBasicVendorOS(); $self->stage1D_installPackageSelection(); + return; } sub updateStage1D @@ -1124,6 +1152,7 @@ sub updateStage1D chrootInto($self->{'vendor-os-path'}); $self->stage1D_updateBasicVendorOS(); + return; } sub startChrootedShellInStage1D @@ -1144,6 +1173,7 @@ sub startChrootedShellInStage1D $self->{'distro'}->updateDistroConfig(); $self->{'meta-packager'}->finishSession(); + return; } sub callChrootedFunctionInStage1D @@ -1160,6 +1190,7 @@ sub callChrootedFunctionInStage1D $self->{'distro'}->updateDistroConfig(); $self->{'meta-packager'}->finishSession(); + return; } sub stage1D_setupPackageSources @@ -1176,6 +1207,7 @@ sub stage1D_setupPackageSources vlog(2, "setting up package source $rk..."); $self->{'meta-packager'}->setupPackageSource($rk, $repo, $excludeList); } + return; } sub stage1D_updateBasicVendorOS @@ -1187,6 +1219,7 @@ sub stage1D_updateBasicVendorOS $self->{'meta-packager'}->updateBasicVendorOS(); $self->{'distro'}->updateDistroConfig(); $self->{'meta-packager'}->finishSession(); + return; } sub stage1D_installPackageSelection @@ -1223,6 +1256,7 @@ sub stage1D_installPackageSelection } $self->{'distro'}->updateDistroConfig(); $self->{'meta-packager'}->finishSession(); + return; } sub clone_fetchSource @@ -1255,6 +1289,7 @@ sub clone_fetchSource or croak _tr( "unable to clone from source '%s', giving up! (%s)\n", $source, $! ); + return; } sub clone_determineIncludeExcludeList @@ -1292,6 +1327,7 @@ sub changePersonalityIfNeeded syscall &SYS_personality, PER_LINUX32(); } + return; } sub hostIs64Bit @@ -1332,6 +1368,7 @@ sub chrootInto or die _tr("unable to chroot into '%s' (%s)\n", $osDir, $!); $ENV{PATH} = "/bin:/sbin:/usr/bin:/usr/sbin"; + return; } 1; diff --git a/installer/OpenSLX/OSSetup/MetaPackager/Base.pm b/installer/OpenSLX/OSSetup/MetaPackager/Base.pm index cfcb013c..16aa290d 100644 --- a/installer/OpenSLX/OSSetup/MetaPackager/Base.pm +++ b/installer/OpenSLX/OSSetup/MetaPackager/Base.pm @@ -35,6 +35,7 @@ sub initialize my $engine = shift; $self->{'engine'} = $engine; + return; } sub initPackageSources @@ -64,6 +65,7 @@ sub startSession $self->{engine}->{distro}->startSession(); # allow vendor specific extensions + return; } sub finishSession @@ -76,6 +78,7 @@ sub finishSession system('umount /proc 2>/dev/null'); removeCleanupFunction('slxos-setup::meta-packager'); + return; } 1; diff --git a/installer/OpenSLX/OSSetup/MetaPackager/smart.pm b/installer/OpenSLX/OSSetup/MetaPackager/smart.pm index 64773d17..3b266ee7 100644 --- a/installer/OpenSLX/OSSetup/MetaPackager/smart.pm +++ b/installer/OpenSLX/OSSetup/MetaPackager/smart.pm @@ -40,6 +40,7 @@ sub initialize $self->SUPER::initialize($engine); $ENV{LC_ALL} = 'POSIX'; + return; } sub initPackageSources @@ -51,6 +52,7 @@ sub initPackageSources if (slxsystem("smart channel -y --remove-all")) { die _tr("unable to remove existing channels (%s)\n", $!); } + return; } sub setupPackageSource @@ -87,6 +89,7 @@ sub setupPackageSource } } } + return; } sub installSelection @@ -100,6 +103,7 @@ sub installSelection if (slxsystem("smart install -y $pkgSelection")) { die _tr("unable to install selection (%s)\n", $!); } + return; } sub updateBasicVendorOS @@ -113,6 +117,7 @@ sub updateBasicVendorOS } die _tr("unable to update this vendor-os (%s)\n", $!); } + return; } 1;
\ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/MetaPackager/yum.pm b/installer/OpenSLX/OSSetup/MetaPackager/yum.pm index 6dfe9523..77ac11d1 100644 --- a/installer/OpenSLX/OSSetup/MetaPackager/yum.pm +++ b/installer/OpenSLX/OSSetup/MetaPackager/yum.pm @@ -40,6 +40,7 @@ sub initialize $self->SUPER::initialize($engine); $ENV{LC_ALL} = 'POSIX'; + return; } sub initPackageSources @@ -48,6 +49,7 @@ sub initPackageSources slxsystem("rm -f /etc/yum.repos.d/*"); slxsystem("mkdir -p /etc/yum.repos.d"); + return; } sub setupPackageSource @@ -74,6 +76,7 @@ sub setupPackageSource } my $repoFile = "/etc/yum.repos.d/$repoName.repo"; spitFile($repoFile, "$repoDescr\nexclude=$excludeList\n"); + return; } sub installSelection @@ -84,6 +87,7 @@ sub installSelection if (slxsystem("yum -y install $pkgSelection")) { die _tr("unable to install selection (%s)\n", $!); } + return; } sub updateBasicVendorOS @@ -97,6 +101,7 @@ sub updateBasicVendorOS } die _tr("unable to update this vendor-os (%s)\n", $!); } + return; } 1;
\ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/Packager/Base.pm b/installer/OpenSLX/OSSetup/Packager/Base.pm index 4ca24621..34927821 100644 --- a/installer/OpenSLX/OSSetup/Packager/Base.pm +++ b/installer/OpenSLX/OSSetup/Packager/Base.pm @@ -34,6 +34,7 @@ sub initialize my $distro = shift; $self->{'distro'} = $distro; + return; } sub unpackPackages diff --git a/installer/OpenSLX/OSSetup/Packager/rpm.pm b/installer/OpenSLX/OSSetup/Packager/rpm.pm index 234ab404..ef254084 100644 --- a/installer/OpenSLX/OSSetup/Packager/rpm.pm +++ b/installer/OpenSLX/OSSetup/Packager/rpm.pm @@ -45,6 +45,7 @@ sub unpackPackages # doesn't crash anymore... (needs busybox update, I suppose) } } + return; } sub importTrustedPackageKeys @@ -61,6 +62,7 @@ sub importTrustedPackageKeys die _tr("unable to import package key <%s> (%s)\n", $keyFile, $!); } } + return; } sub installPrerequiredPackages @@ -76,6 +78,7 @@ sub installPrerequiredPackages die _tr("error during prerequired-package-installation (%s)\n", $!); } slxsystem("rm", "-rf", "$finalPath/var/lib/rpm"); + return; } sub installPackages @@ -89,6 +92,7 @@ sub installPackages if (slxsystem("rpm", "--root=$finalPath", "-ivh", @$pkgs)) { die _tr("error during package-installation (%s)\n", $!); } + return; } sub getInstalledPackages @@ -100,4 +104,4 @@ sub getInstalledPackages return split "\n", $pkgList; } -1;
\ No newline at end of file +1; diff --git a/lib/OpenSLX/Basics.pm b/lib/OpenSLX/Basics.pm index b663a32c..6f61c7a7 100644 --- a/lib/OpenSLX/Basics.pm +++ b/lib/OpenSLX/Basics.pm @@ -141,6 +141,7 @@ sub vlog $str .= "\n"; } print $openslxLog $str; + return; } # ------------------------------------------------------------------------------ @@ -276,6 +277,7 @@ sub trInit ); } } + return; } # ------------------------------------------------------------------------------ @@ -321,6 +323,7 @@ sub callInSubprocess if ($?) { exit $?; } + return; } # ------------------------------------------------------------------------------ @@ -347,6 +350,7 @@ sub addCleanupFunction my $func = shift; $cleanupFunctions{$name} = $func; + return; } # ------------------------------------------------------------------------------ @@ -355,6 +359,7 @@ sub removeCleanupFunction my $name = shift; delete $cleanupFunctions{$name}; + return; } # ------------------------------------------------------------------------------ @@ -365,6 +370,7 @@ sub invokeCleanupFunctions vlog(2, "invoking cleanup function '$name'..."); $cleanupFunctions{$name}->(); } + return; } # ------------------------------------------------------------------------------ @@ -381,7 +387,6 @@ sub slxsystem if ($signalNo > 0 && $signalNo != 13) { die _tr("child-process reveived signal '%s', parent stops!", $signalNo); - exit; } } return $res; @@ -391,18 +396,21 @@ sub slxsystem sub cluck { _doThrowOrWarn('cluck', @_); + return; } # ------------------------------------------------------------------------------ sub carp { _doThrowOrWarn('carp', @_); + return; } # ------------------------------------------------------------------------------ sub warn { _doThrowOrWarn('warn', @_); + return; } # ------------------------------------------------------------------------------ @@ -410,6 +418,7 @@ sub confess { invokeCleanupFunctions(); _doThrowOrWarn('confess', @_); + return; } # ------------------------------------------------------------------------------ @@ -417,6 +426,7 @@ sub croak { invokeCleanupFunctions(); _doThrowOrWarn('croak', @_); + return; } # ------------------------------------------------------------------------------ @@ -424,6 +434,7 @@ sub die { invokeCleanupFunctions(); _doThrowOrWarn('die', @_); + return; } # ------------------------------------------------------------------------------ @@ -460,6 +471,7 @@ sub _doThrowOrWarn my $func = $functionFor{$type}; $func->("$msg\n"); } + return; } # ------------------------------------------------------------------------------ diff --git a/lib/OpenSLX/Utils.pm b/lib/OpenSLX/Utils.pm index 207edb98..22555df3 100644 --- a/lib/OpenSLX/Utils.pm +++ b/lib/OpenSLX/Utils.pm @@ -14,6 +14,8 @@ package OpenSLX::Utils; use strict; +use warnings; + use vars qw(@ISA @EXPORT $VERSION); use Exporter; |