2

It's a fresh install of Sabayon Linux. I installed mysql (equo install dev-db/mysql), configured it (emerge --config ...), but it doesn't start using /etc/init.d script:

# /etc/init.d/mysql start
 * WARNING: mysql is already starting
# /etc/init.d/mysql status
 * You are attempting to run an openrc service on a
 * system which openrc did not boot.
 * You may be inside a chroot or you may have used
 * another initialization system to boot this system.
 * In this situation, you will get unpredictable results!
 * If you really want to do this, issue the following command:
 * touch /run/openrc/softlevel
# /etc/init.d/mysql stop
 * ERROR: mysql stopped by something else

Touching /run/openrc/softlevel causes even more errors. Googling doesn't advise much.

I remember recent OpenRC migration on my Gentoo box, but there I'm still using init.d scripts. Anything else changed I didn't notice?

PersianGulf
  • 10,728
  • 8
  • 51
  • 78
Kombajn zbożowy
  • 215
  • 1
  • 11

2 Answers2

1

Some of services run by process manager such as : upstart, systemd, OpenRC (your case) , SysV and so on. if get ps ax |ergep -i mysql you'll find out myql is running,

Use the following documentation: OpenRC doc

PersianGulf
  • 10,728
  • 8
  • 51
  • 78
  • Uh... yes, it's there... now. I promise, I checked several times, attempting to connect via MySQL workbench and also by checking processes with ps and it was NOT running. I guess it was all about asking a question at Stack Exchange which forced it to run eventually. Magic, yes. – Kombajn zbożowy Oct 28 '13 at 22:01
0

OpenRC heavily relies on state files to track the expected status of a service.

It is not being especially smart about it.

This means if any given piece of information is wrong (i.e. a chroot that didn't play through an openrc shutdown correctly before a start up), it will be pretty stuck.

a start-stop-start sequence should always recover from such a situation, then you just need to make sure you have the order right.

unfortunately there is no law requiring init authors to read up on state machines.

Florian Heigl
  • 216
  • 1
  • 8