[LON-CAPA-cvs] cvs: loncom /debugging_tools modify_config_files.pl

raeburn raeburn at source.lon-capa.org
Mon Mar 22 17:15:53 EDT 2021


raeburn		Mon Mar 22 21:15:53 2021 EDT

  Modified files:              
    /loncom/debugging_tools	modify_config_files.pl 
  Log:
  - Store wait_timeout value in appropriate MySQL config file for Ubuntu.  
  
  
Index: loncom/debugging_tools/modify_config_files.pl
diff -u loncom/debugging_tools/modify_config_files.pl:1.18 loncom/debugging_tools/modify_config_files.pl:1.19
--- loncom/debugging_tools/modify_config_files.pl:1.18	Sat Mar 13 19:38:32 2021
+++ loncom/debugging_tools/modify_config_files.pl	Mon Mar 22 21:15:53 2021
@@ -2,7 +2,7 @@
 #
 # The LearningOnline Network
 #
-# $Id: modify_config_files.pl,v 1.18 2021/03/13 19:38:32 raeburn Exp $
+# $Id: modify_config_files.pl,v 1.19 2021/03/22 21:15:53 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -244,8 +244,17 @@
     }
 }
 
+my $mysqlfile = '/etc/my.cnf';
+if ($dist =~ /^ubuntu(\d+)$/) {
+    my $version = $1;
+    $mysqlfile = '/etc/mysql/my.cnf';
+    if ($version > 14) {
+        $mysqlfile = '/etc/mysql/mysql.conf.d/mysqld.cnf';
+    }
+}
+
 my $mysql_global_status =
-    &update_file('/etc/my.cnf',
+    &update_file($mysqlfile,
              [{section =>'mysqld',
                key     =>'wait_timeout=',
                value   =>'31536000', }]);




More information about the LON-CAPA-cvs mailing list