Web lists-archives.com

Init script fails.




TLDR = /etc/init.d/mysql start fails after the following line (line 22), and I would like to fix it so that init starts mysqld automatically.

Problem line:

|./lib/lsb/init-functions|

This is included in nearly all init scripts, and other init scripts work just fine. Putting breadcrumbs in this function, it will execute all the way down to this line:

for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null); do

     [ -r $hook ] && . $hook || true

 done

I can echo $hook in the loop, and it works. But, anything after 'done' fails. strace shows me that the files referenced in the loop are opened, read, and then closed, but this final line may not be getting executed.

 FANCYTTY=

 [ -e /etc/lsb-base-logging.sh ] && . /etc/lsb-base-logging.sh || true

##Background:

This happend after I attempted to install KDE on this workstation. KDE decided to uninstall mysql-server (for some strange reason), which caused all sorts of problems including corrupt tables, which I restored from a backup.

Everything is not fixed, EXCEPT the init scripts do not work.

I narrowed it down to this line by putting "echo 'ok'" after each statement as it executes from top to bottom to see the last executing line. At first, it died because /usr/bin/mysqld_safe did not exist. apt-get remove --purge [insert all mysql packages here] followed by fixing all broken dependencies,and then apt-get install mysql-server mysql-client fixed that.