die "add2startup(): one or more arguments are not defined! Exit.\n"
unless( defined $subsys && defined $exec_sys && defined $cmd && defined $aref);
- if( $cmd =~ /exec_script{(\w+)}/ ){
+ if( $cmd =~ /exec_script\{(\w+)\}/ ){
my $exec_sys = $1;
#- exec_script is followed only by one parameter [0]: script name
&readScript( $aref->[0], $exec_sys );
}
- elsif( $cmd =~ /exec_cmd{(\w+)}/){
+ elsif( $cmd =~ /exec_cmd\{(\w+)\}/){
my $exec_sys = $1;
my $args = &getArgs4cmd($aref, $subsys);
}
{$THRPATH}gxms; # ...with lxhadesdaq path
- if( $thresh =~ /\${TRBNUM}/ ){
+ if( $thresh =~ /\$\{TRBNUM\}/ ){
foreach my $trb ( @{$trb_href->{$exec_sys}} ){
my $trbnum = 0; #default
if( $trb =~ /etraxp?(\d{3})/ || $trb =~ /trb?\d(\d{2})/){
#- replace TRBNUM
$thresh =~ s{ # Substitue ...
- \${TRBNUM} # ... a parameter
+ \$\{TRBNUM\} # ... a parameter
}
{$trbnum}gxms; # ... with a TRB number
#- replace TRBNUM
$cmd =~ s{ # Substitue...
- \${TRBNUM} # ...a parameter
+ \$\{TRBNUM\} # ...a parameter
}
{$trbnum}gxms; # Raplace it with a TRB number
#- replace EBIP
$cmd =~ s{ # Substitue...
- \${EBIP} # ...a parameter
+ \$\{EBIP\} # ...a parameter
}
{$eb_ip}gxms; # Raplace it with a EB IP
#- replace EBPORT
$cmd =~ s{ # Substitue...
- \${EBPORT} # ...a parameter
+ \$\{EBPORT\} # ...a parameter
}
{$eb_port}gxms; # Raplace it with a EB PORT
foreach my $sys (%$trb_href){
- next unless( defined @{$trb_href->{$sys}} && $#{$trb_href->{$sys}} > 0 );
+ next unless( @{$trb_href->{$sys}} && $#{$trb_href->{$sys}} > 0 );
foreach my $host (@$dead_hosts_aref){
@{$trb_href->{$sys}} = grep { !($_ eq $host) } @{$trb_href->{$sys}};