Date: Mon, 28 Mar 2005 12:05:40 -0500 (EST) From: Jerry McAllister <jerrymc@clunix.cl.msu.edu> To: jhnpublic@yahoo.com (John Public) Cc: freebsd-questions@freebsd.org Subject: Re: su command problem Message-ID: <200503281705.j2SH5ee02191@clunix.cl.msu.edu> In-Reply-To: <20050328153347.15523.qmail@web50109.mail.yahoo.com> from "John Public" at Mar 28, 2005 07:33:47 AM
next in thread | previous in thread | raw e-mail | index | archive | help
> > To whom it may concern: > > 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. Maybe it really traces to the fact that you should not run any command from rc.conf. It is not treated as a script. Rather, rc.conf is merely a list of variable settings that the startup scripts for various programs read up when they need it. If you want to run something at startup, put them in /usr/local/etc/rc.d give them a name ending in .sh and make them executable. Those scripts will be run in roughly 'sort' order. > > 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. You don't want to run mysql in rc.conf, just do the setting of mysql_enable="YES" in there and put something like mysql-server.sh in /usr/local/etc/rc.d In fact, the normal mysql install from ports puts the script there. You may have to change its permissions to make it executable. ////jerry > > This system is running FreeBSD 5.3. I have another > system which uses FreeBSD 5.2.1 and doesn't have this > problem. I'm not sure if this is a security fix that > has been implemented in 5.3 or if the issue lies > elsewhere. > > I have been able to implement a workaround to make > them work by changing their startup scripts to not use > su, but would like to resolve the issue. > > I have check the problem reports on the FreeBSD > website and don't see anything that appears to be > related. I have also google'd this and found nothing. > I also didn't find anything in the manual. Any help > would be greatly appreciated. Thanks in advance. > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503281705.j2SH5ee02191>