su command problem

Jeff Wirth jeff.wirth at gmail.com
Mon Mar 28 08:33:54 PST 2005


> 
> I am running into an issue using rc.conf to run
> applications at startup.  Specifically, nagios, and
> mysql.  When the system boots, it goes to a command
> prompt at the stage of the boot process when those
> applications would be run and then stops.  If I exit
> out of the prompt, booting continues normally.
> 
> I believe I have traced the problem to the su command
> which is used in the rc.  In attempting to run the
> mysql w/ mysql_enable="YES" in the rc.conf, it su's to
> the mysql account and is supposed to run a command and
> exit.  It su's to mysql OK, but never runs the command
> and exits.  I have attempted this manually and
> received the same results.
>

hmmm.  (going under the assumption that you installed from ports 4.1.x
?)  There should be a startup script in /usr/local/etc/rc.d that
launches mysql.  Using the new style, it does check rc.conf to see if
it should start, mode, etc.

As far as the 'su' bit, the script itself doesn't do this.  The mysql
daemon has a 'user' switch that is used to start mysqld as a user
other then root.

Do you get the same behavior when you run the start-up script manually?

-jw


More information about the freebsd-questions mailing list