- Timestamp:
- 2013-06-10T16:32:41+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/parallel-building/trunk/src/perllib/FileUtils/HDThriftFS.pm
r27568 r27591 73 73 74 74 # Configuration 75 my $host = "localhost"; 75 my $host = (`hostname -s` || `hostname -a` || `hostname` || $ENV{'HOSTNAME'} || 'localhost'); 76 chomp($host); 76 77 my $port = 58660; 77 78 my $debug = 0; … … 124 125 print " * Found Thrift configuration file:\n"; 125 126 my $conf_raw = &FileUtils::fileGetContents($conf_file_path); 126 if ($conf_raw =~ /^([^:]+):(\d+)/) 127 { 128 $host = $1; 129 print " - Host: " . $host . "\n"; 127 if ($conf_raw =~ /^([^:]*):(\d+)/) 128 { 129 my $new_host = $1; 130 130 $port = $2; 131 if ($new_host ne '' && $new_host ne 'localhost') 132 { 133 $host = $new_host; 134 print " - Host: " . $host . "\n"; 135 } 131 136 print " - Port: " . $port . "\n"; 132 137 }
Note:
See TracChangeset
for help on using the changeset viewer.