Lines 6278-6287
Link Here
|
6278 |
my $authd_conf_file = "$conf_dir/vmware-authd"; |
6278 |
my $authd_conf_file = "$conf_dir/vmware-authd"; |
6279 |
my $authd = db_get_answer('SBINDIR') . "/vmware-authd"; |
6279 |
my $authd = db_get_answer('SBINDIR') . "/vmware-authd"; |
6280 |
|
6280 |
|
|
|
6281 |
# Never overwrite an existing conf file unless it has the exact modification |
6282 |
# date as in the database in which case we can be pretty sure that it is the |
6283 |
# one that we wrote and it should be safe to assume that we can overwrite it. |
6284 |
if( -f $authd_conf_file ) { |
6285 |
my @statbuf = stat( $authd_conf_file ); |
6286 |
if( ! defined( $statbuf[9] ) ) { |
6287 |
error( |
6288 |
'Unable to get the last modification timestamp of file "' |
6289 |
. $authd_conf_file . "\".\n\n" |
6290 |
); |
6291 |
} |
6292 |
if( |
6293 |
! db_file_in( $authd_conf_file ) |
6294 |
|| db_file_ts( $authd_conf_file ) != $statbuf[9] |
6295 |
) { |
6296 |
query( |
6297 |
'The file "' . $authd_conf_file . '" already exists and seems to have' |
6298 |
. ' been modified manually. Consequently, this program cannot add a "' |
6299 |
. $authd . '" entry in the file. You will have to do it by hand' |
6300 |
. ' before running ' . vmware_product_name() . ".\n\n" |
6301 |
. ' Hit enter to continue.', |
6302 |
'', 0 |
6303 |
); |
6304 |
return; |
6305 |
} |
6306 |
} |
6307 |
|
6281 |
# Create the new vmware-authd file |
6308 |
# Create the new vmware-authd file |
6282 |
# XXX This file should be registered with the installer's database. --hpreg |
|
|
6283 |
if (not open(CONF, '>' . $authd_conf_file)) { |
6309 |
if (not open(CONF, '>' . $authd_conf_file)) { |
6284 |
query('Unable to create the "' . $authd_conf_file . '"file. ' |
6310 |
query('Unable to create the "' . $authd_conf_file . '" file. ' |
6285 |
. 'Consequently, this program cannot add a "' . $authd . '" entry ' |
6311 |
. 'Consequently, this program cannot add a "' . $authd . '" entry ' |
6286 |
. 'in the file. You will have to do it by hand before running ' |
6312 |
. 'in the file. You will have to do it by hand before running ' |
6287 |
. vmware_product_name() . '.' . "\n\n" . 'Hit enter to continue.', |
6313 |
. vmware_product_name() . '.' . "\n\n" . 'Hit enter to continue.', |
Lines 6304-6309
Link Here
|
6304 |
END |
6330 |
END |
6305 |
close CONF; |
6331 |
close CONF; |
6306 |
|
6332 |
|
|
|
6333 |
db_add_file( $authd_conf_file, 0x1 ); |
6334 |
|
6307 |
# Make sure the IP service is registered, as RH 9.0's xinetd is picky about |
6335 |
# Make sure the IP service is registered, as RH 9.0's xinetd is picky about |
6308 |
# that (was bug 26864). --hpreg |
6336 |
# that (was bug 26864). --hpreg |
6309 |
if (check_port_not_registered($port) == 1) { |
6337 |
if (check_port_not_registered($port) == 1) { |