From owner-freebsd-questions@FreeBSD.ORG Mon Mar 28 17:05:42 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7AA6616A4CE for ; Mon, 28 Mar 2005 17:05:42 +0000 (GMT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0273E43D31 for ; Mon, 28 Mar 2005 17:05:42 +0000 (GMT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.7p1+Sun/8.11.7) id j2SH5ee02191; Mon, 28 Mar 2005 12:05:40 -0500 (EST) From: Jerry McAllister Message-Id: <200503281705.j2SH5ee02191@clunix.cl.msu.edu> To: jhnpublic@yahoo.com (John Public) Date: Mon, 28 Mar 2005 12:05:40 -0500 (EST) In-Reply-To: <20050328153347.15523.qmail@web50109.mail.yahoo.com> from "John Public" at Mar 28, 2005 07:33:47 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: su command problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2005 17:05:42 -0000 > > 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" >