--- loncom/debugging_tools/modify_config_files.pl 2004/08/10 20:26:02 1.2 +++ loncom/debugging_tools/modify_config_files.pl 2004/08/11 17:32:53 1.3 @@ -2,7 +2,7 @@ # # The LearningOnline Network # -# $Id: modify_config_files.pl,v 1.2 2004/08/10 20:26:02 matthew Exp $ +# $Id: modify_config_files.pl,v 1.3 2004/08/11 17:32:53 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -49,6 +49,9 @@ copies of each file are made in /etc. use strict; use File::Copy; +use lib '/home/httpd/lib/perl/'; +use LONCAPA::Configuration; +my $loncapa_config=LONCAPA::Configuration::read_conf('loncapa.conf'); &update_file('/etc/yum.conf', [{section => 'loncapa-updates-i386', @@ -72,6 +75,20 @@ use File::Copy; key =>'set-variable=wait_timeout=', value =>'31536000', }]); + +my $local_my_cnf = '/home/www/.my.cnf'; +if (! -e $local_my_cnf) { +# # Create a file so we can do something with it... + system("touch $local_my_cnf"); +} +&update_file($local_my_cnf, + [{section =>'client', + key =>'user=', + value =>'www',}, + {section =>'client', + key =>'password=', + value =>$loncapa_config->{'lonSqlAccess'}},]); + exit;