Commit 8d747c5f authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

Import improvements in the mysql-5.6 Debian git repository up and until commit 0af5a830

parent 20ece5fd
...@@ -171,7 +171,9 @@ EOF ...@@ -171,7 +171,9 @@ EOF
else else
pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`; pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`;
if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi
umask 066
cat /dev/null > $dc cat /dev/null > $dc
umask 022
echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc
echo "[client]" >>$dc echo "[client]" >>$dc
echo "host = localhost" >>$dc echo "host = localhost" >>$dc
......
...@@ -78,6 +78,6 @@ if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then ...@@ -78,6 +78,6 @@ if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
fi fi
# (normally) End automatically added section # (normally) End automatically added section
# no DEBHELPER here, "update-rc.d remove" fails if mysql-server-5.1 is installed #DEBHELPER#
exit 0 exit 0
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
Author: Mathias Gug <mathias.gug@canonical.com> Author: Mathias Gug <mathias.gug@canonical.com>
''' '''
from __future__ import print_function, unicode_literals
import os, os.path import os, os.path
from apport.hookutils import * from apport.hookutils import *
...@@ -29,24 +30,23 @@ def add_info(report): ...@@ -29,24 +30,23 @@ def add_info(report):
report[key] += line + '\n' report[key] += line + '\n'
except IndexError: except IndexError:
continue continue
key = 'Logs' + path_to_key('/var/log/kern.log') if os.path.exists('/var/log/mysql/error.log'):
report[key] = "" key = 'Logs' + path_to_key('/var/log/mysql/error.log')
for line in read_file('/var/log/kern.log').split('\n'): report[key] = ""
try: for line in read_file('/var/log/mysql/error.log').split('\n'):
if '/usr/sbin/mysqld' in string.join(line.split()[4:]): report[key] += line + '\n'
report[key] += line + '\n' attach_mac_events(report, '/usr/sbin/mysqld')
except IndexError: attach_file(report,'/etc/apparmor.d/usr.sbin.mysqld')
continue
_add_my_conf_files(report, '/etc/mysql/my.cnf') _add_my_conf_files(report, '/etc/mysql/my.cnf')
for f in os.listdir('/etc/mysql/conf.d'): for f in os.listdir('/etc/mysql/conf.d'):
_add_my_conf_files(report, os.path.join('/etc/mysql/conf.d', f)) _add_my_conf_files(report, os.path.join('/etc/mysql/conf.d', f))
try: try:
report['MySQLVarLibDirListing'] = unicode(os.listdir('/var/lib/mysql')) report['MySQLVarLibDirListing'] = str(os.listdir('/var/lib/mysql'))
except OSError: except OSError:
report['MySQLVarLibDirListing'] = unicode(False) report['MySQLVarLibDirListing'] = str(False)
if __name__ == '__main__': if __name__ == '__main__':
report = {} report = {}
add_info(report) add_info(report)
for key in report: for key in report:
print '%s: %s' % (key, report[key].split('\n', 1)[0]) print('%s: %s' % (key, report[key].split('\n', 1)[0]))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment