setupscript.pm (b274bc22) | setupscript.pm (dba1a2e4) |
---|---|
1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance --- 17 unchanged lines hidden (view full) --- 26use installer::existence; 27use installer::exiter; 28use installer::globals; 29use installer::logger; 30use installer::remover; 31use installer::scriptitems; 32use installer::ziplist; 33 | 1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance --- 17 unchanged lines hidden (view full) --- 26use installer::existence; 27use installer::exiter; 28use installer::globals; 29use installer::logger; 30use installer::remover; 31use installer::scriptitems; 32use installer::ziplist; 33 |
34use strict; 35 |
|
34####################################################### 35# Set setup script name, if not defined as parameter 36####################################################### 37 38sub set_setupscript_name 39{ 40 my ( $allsettingsarrayref, $includepatharrayref ) = @_; 41 --- 27 unchanged lines hidden (view full) --- 69 installer::exiter::exit_program("ERROR: Script $scriptname not found!", "set_setupscript_name"); 70 } 71} 72 73##################################################################### 74# Reading script variables from installation object of script file 75##################################################################### 76 | 36####################################################### 37# Set setup script name, if not defined as parameter 38####################################################### 39 40sub set_setupscript_name 41{ 42 my ( $allsettingsarrayref, $includepatharrayref ) = @_; 43 --- 27 unchanged lines hidden (view full) --- 71 installer::exiter::exit_program("ERROR: Script $scriptname not found!", "set_setupscript_name"); 72 } 73} 74 75##################################################################### 76# Reading script variables from installation object of script file 77##################################################################### 78 |
77sub get_all_scriptvariables_from_installation_object | 79sub get_all_scriptvariables_from_installation_object ($$) |
78{ | 80{ |
79 my ($scriptref) = @_; | 81 my ($scriptref, $script_filename) = @_; |
80 81 my @installobjectvariables; 82 83 for ( my $i = 0; $i <= $#{$scriptref}; $i++ ) 84 { 85 my $line = ${$scriptref}[$i]; 86 87 if ( $line =~ /^\s*Installation\s+\w+\s*$/ ) # should be the first line --- 428 unchanged lines hidden (view full) --- 516 517 # SOLARISBRANDPACKAGENAME 518 # needs to be replaced by 519 # PRESETSOLARISBRANDPACKAGENAME 520 521 my @presetproperties = (); 522 push(@presetproperties, "SOLARISBRANDPACKAGENAME"); 523 push(@presetproperties, "SYSTEMINTUNIXPACKAGENAME"); | 82 83 my @installobjectvariables; 84 85 for ( my $i = 0; $i <= $#{$scriptref}; $i++ ) 86 { 87 my $line = ${$scriptref}[$i]; 88 89 if ( $line =~ /^\s*Installation\s+\w+\s*$/ ) # should be the first line --- 428 unchanged lines hidden (view full) --- 518 519 # SOLARISBRANDPACKAGENAME 520 # needs to be replaced by 521 # PRESETSOLARISBRANDPACKAGENAME 522 523 my @presetproperties = (); 524 push(@presetproperties, "SOLARISBRANDPACKAGENAME"); 525 push(@presetproperties, "SYSTEMINTUNIXPACKAGENAME"); |
524 # push(@presetproperties, "UNIXPACKAGENAME"); 525 # push(@presetproperties, "WITHOUTDOTUNIXPACKAGENAME"); 526 # push(@presetproperties, "UNIXPRODUCTNAME"); 527 # push(@presetproperties, "WITHOUTDOTUNIXPRODUCTNAME"); | |
528 529 | 526 527 |
530 foreach $property ( @presetproperties ) | 528 foreach my $property (@presetproperties) |
531 { 532 my $presetproperty = "PRESET" . $property; 533 if (( exists($allvariables->{$presetproperty}) ) && ( $allvariables->{$presetproperty} ne "" )) 534 { 535 $allvariables->{$property} = $allvariables->{$presetproperty}; 536 } 537 } 538} 539 5401; | 529 { 530 my $presetproperty = "PRESET" . $property; 531 if (( exists($allvariables->{$presetproperty}) ) && ( $allvariables->{$presetproperty} ne "" )) 532 { 533 $allvariables->{$property} = $allvariables->{$presetproperty}; 534 } 535 } 536} 537 5381; |