| Line 19... |
Line 19... |
| 19 |
|
19 |
|
| 20 |
my $config;
|
20 |
my $config;
|
| 21 |
|
21 |
|
| 22 |
sub findSendEmail {
|
22 |
sub findSendEmail {
|
| 23 |
my $currentLocation = shift;
|
23 |
my $currentLocation = shift;
|
| - |
|
24 |
my @possibles = (
|
| - |
|
25 |
'/usr/local/opt/sendEmail/sendEmail',
|
| 24 |
my @possibles = ( '/opt/sendEmail/sendEmail', '/opt/sendEmail/sendEmail.pl' );
|
26 |
'/usr/local/opt/sendEmail/sendEmail.pl',
|
| - |
|
27 |
'/opt/sendEmail/sendEmail',
|
| - |
|
28 |
'/opt/sendEmail/sendEmail.pl'
|
| - |
|
29 |
);
|
| 25 |
return $currentLocation if ( $currentLocation && -x $currentLocation );
|
30 |
return $currentLocation if ( $currentLocation && -x $currentLocation );
|
| 26 |
# well, we didn't find it, so look around some more
|
31 |
# well, we didn't find it, so look around some more
|
| 27 |
# we install it in /opt, so try there
|
32 |
# we install it in /opt, so try there
|
| 28 |
foreach my $current ( @possibles ) {
|
33 |
foreach my $current ( @possibles ) {
|
| 29 |
return $current if -x $current;
|
34 |
return $current if -x $current;
|
| Line 42... |
Line 47... |
| 42 |
|
47 |
|
| 43 |
$$config{'clientName'} = &getAnswer( "Client Name ", ($$config{'clientName'}) );
|
48 |
$$config{'clientName'} = &getAnswer( "Client Name ", ($$config{'clientName'}) );
|
| 44 |
$$config{'serialNumber'} = &getAnswer( "Serial Number ", ($$config{'serialNumber'}) );
|
49 |
$$config{'serialNumber'} = &getAnswer( "Serial Number ", ($$config{'serialNumber'}) );
|
| 45 |
$$config{'hostname'} = &getAnswer( "Host Name ", ($$config{'hostname'}) );
|
50 |
$$config{'hostname'} = &getAnswer( "Host Name ", ($$config{'hostname'}) );
|
| 46 |
|
51 |
|
| 47 |
$temp = join( ",", @{ $$config{ 'moduleDirs' } } );
|
52 |
$temp = join( ",", @{ $$config{ 'moduleDirs' } } ) if $$config{ 'moduleDirs' };
|
| 48 |
$temp = &getAnswer( "Locations to search for modules (comma separated) ", ($temp) );
|
53 |
$temp = &getAnswer( "Locations to search for modules (comma separated) ", ($temp) );
|
| 49 |
$$config{ 'moduleDirs' } = [ split( ',', $temp ) ];
|
54 |
$$config{ 'moduleDirs' } = [ split( ',', $temp ) ];
|
| 50 |
|
55 |
|
| 51 |
$temp = join( ",", @{ $$config{ 'scriptDirs' } } );
|
56 |
$temp = join( ",", @{ $$config{ 'scriptDirs' } } );
|
| 52 |
$temp = &getAnswer( "Locations to search for scripts (comma separated) ", ($temp) );
|
57 |
$temp = &getAnswer( "Locations to search for scripts (comma separated) ", ($temp) );
|
| Line 123... |
Line 128... |
| 123 |
}
|
128 |
}
|
| 124 |
|
129 |
|
| 125 |
|
130 |
|
| 126 |
&processParameters( @ARGV );
|
131 |
&processParameters( @ARGV );
|
| 127 |
|
132 |
|
| - |
|
133 |
$sysinfo3 = findConf( $sysinfo3 );
|
| - |
|
134 |
|
| 128 |
if ( -f $sysinfo3 && &yesno( 'I found an existing configuration, modify it ' ) ) {
|
135 |
if ( -f $sysinfo3 && &yesno( 'I found an existing configuration, modify it ' ) ) {
|
| 129 |
print "Loading defaults from existing config $sysinfo3\n";
|
136 |
print "Loading defaults from existing config $sysinfo3\n";
|
| 130 |
$config = makeConfig( ( $sysinfo3 ) );
|
137 |
$config = makeConfig( ( $sysinfo3 ) );
|
| 131 |
my $content = &showConf( $config );
|
138 |
my $content = &showConf( $config );
|
| 132 |
}
|
139 |
}
|