fbsd 6.1 and starting services problem
Hi, It is my first fbsd 6.1. I migrate a system from fbsd 6.0 to 6.1. I have a script postgresql.sh in /usr/local/etc/rc.d. It is executible. Also it is working on 6.0 at startup. But it do not runs in fbsd 6.1. If I try /usr/local/etc/rc.d/postgresql.sh start all is fine. I checked : cat /etc/defaults/rc.conf | grep local_startup local_startup=/usr/local/etc/rc.d /usr/X11R6/etc/rc.d # startup script dirs. It looks ok for me. Pls. help me to find the problem. Also fbsd do not start at boot any services with scripts in /usr/local/etc/rc.d . Best regards, ivan. - Спортни залагания! bg.sportingbet.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: fbsd 6.1 and starting services problem
[EMAIL PROTECTED] writes: Hi, It is my first fbsd 6.1. I migrate a system from fbsd 6.0 to 6.1. I have a script postgresql.sh in /usr/local/etc/rc.d. It is executible. Also it is working on 6.0 at startup. But it do not runs in fbsd 6.1. If I try /usr/local/etc/rc.d/postgresql.sh start all is fine. I checked : cat /etc/defaults/rc.conf | grep local_startup local_startup=/usr/local/etc/rc.d /usr/X11R6/etc/rc.d # startup script dirs. It looks ok for me. Pls. help me to find the problem. Also fbsd do not start at boot any services with scripts in /usr/local/etc/rc.d . Did you remember to use mergemaster(8) to update your /etc scripts? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: fbsd 6.1 and starting services problem
Thanks for the answer. I think I do not need to use mergemaster. It is a brand new install of FreeBSD 6.1. I only copy all my scripts from /usr/local/etc/rc.d/. For example the postgresql install is NOT from ports. I instaaled it from source ( I did it many times on 5.1, 5.4 and 6.0 ). I expect that all scripts in /usr/local/etc/rc.d/ will be run on system start. After login as root if I try to execute /usr/local/etc/rc.d/postgres.sh start, all is working perfect. But I need it to start after system start alone. Here is my script: # ls -l /usr/local/etc/rc.d/postgres.sh -rwxr-xr-x 1 root wheel 1327 Jul 24 21:25 /usr/local/etc/rc.d/postgres.sh #! /bin/sh # PostgreSQL boot time startup script for FreeBSD. Copy this file to # /usr/local/etc/rc.d/postgresql. # Created through merger of the Linux start script by Ryan Kirkpatrick # and the script in the FreeBSD ports collection. # $Header: /cvsroot/pgsql-server/contrib/start-scripts/freebsd,v 1.2 2001/04/19 19:17:44 petere Exp $ ## EDIT FROM HERE # PROVIDE: postgresql # Installation prefix prefix=/usr # Data directory PGDATA=/usr/mydb # Who to run pg_ctl as, should be postgres. PGUSER=postgres # Where to keep a log file PGLOG=$PGDATA/postgres.log ## STOP EDITING HERE # The path that is to be used for the script PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # What to use to start up the postmaster DAEMON=$prefix/bin/pg_ctl test -x $DAEMON || exit 0 case $1 in start) su -l $PGUSER -c $DAEMON start -D '$PGDATA' -s -l $PGLOG echo -n ' postgresql' ;; stop) su -l $PGUSER -c $DAEMON stop -D '$PGDATA' -s -m fast ;; restart) su -l $PGUSER -c $DAEMON restart -D '$PGDATA' -s -m fast ;; status) su -l $PGUSER -c $DAEMON status -D '$PGDATA' ;; *) # Print help echo Usage: Basename $0 {start|stop|restart|status} 12 exit 1 ;; esac exit 0 Цитат на писмо от Lowell Gilbert [EMAIL PROTECTED]: [EMAIL PROTECTED] writes: Hi, It is my first fbsd 6.1. I migrate a system from fbsd 6.0 to 6.1. I have a script postgresql.sh in /usr/local/etc/rc.d. It is executible. Also it is working on 6.0 at startup. But it do not runs in fbsd 6.1. If I try /usr/local/etc/rc.d/postgresql.sh start all is fine. I checked : cat /etc/defaults/rc.conf | grep local_startup local_startup=/usr/local/etc/rc.d /usr/X11R6/etc/rc.d # startup script dirs. It looks ok for me. Pls. help me to find the problem. Also fbsd do not start at boot any services with scripts in /usr/local/etc/rc.d . Did you remember to use mergemaster(8) to update your /etc scripts? - Изработване на сайт по Ваше желание за 300лв. http://tophost.bg/?top=webdisign ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: starting services?
On Mon, 21 Nov 2005 10:17:01 +0800, Foo Ji-Haw wrote i wonder why i cannot start for instance ssh with /etc/rc.d/sshd start but i always have to use /etc/rc.d/sshd forcestart and similarly for stop, status, etc. any ideas pls ?? You have to add a line in /etc/rc.conf. I think it is samba_enable=YES. well, if you add sshd_enable=YES, the service (always) starts on boot. i just want to start it manually and i wonder why it doesn't listen to start argument but only forcestart and similarly for other commands i've got to use force. anyone knows why pls ?? martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: starting services?
On Monday, 21 November 2005 at 15:11:35 +0100, martinko wrote: On Mon, 21 Nov 2005 10:17:01 +0800, Foo Ji-Haw wrote i wonder why i cannot start for instance ssh with /etc/rc.d/sshd start but i always have to use /etc/rc.d/sshd forcestart and similarly for stop, status, etc. any ideas pls ?? You have to add a line in /etc/rc.conf. I think it is samba_enable=YES. well, if you add sshd_enable=YES, the service (always) starts on boot. i just want to start it manually and i wonder why it doesn't listen to start argument but only forcestart and similarly for other commands i've got to use force. anyone knows why pls ?? martin Because when the system boots up it sends the 'start' argument to all the scripts in the rc.d directories, those scripts then check wether they should start or not. Force start simply overrides that check. Halldor ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: starting services?
On 11/21/05, Halldor R. Haflidason [EMAIL PROTECTED] wrote: On Monday, 21 November 2005 at 15:11:35 +0100, martinko wrote: On Mon, 21 Nov 2005 10:17:01 +0800, Foo Ji-Haw wrote i wonder why i cannot start for instance ssh with /etc/rc.d/sshd start but i always have to use /etc/rc.d/sshd forcestart and similarly for stop, status, etc. any ideas pls ?? You have to add a line in /etc/rc.conf. I think it is samba_enable=YES. well, if you add sshd_enable=YES, the service (always) starts on boot. i just want to start it manually and i wonder why it doesn't listen to start argument but only forcestart and similarly for other commands i've got to use force. anyone knows why pls ?? martin Because when the system boots up it sends the 'start' argument to all the scripts in the rc.d directories, those scripts then check wether they should start or not. Force start simply overrides that check. Halldor Then something's broken, no? If the service isnt running and you send it a start and it doesnt start, then that's bad. You shouldnt need to override some checks, it should do what it's commanded to do. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: starting services?
Michael Beattie wrote: On 11/21/05, Halldor R. Haflidason [EMAIL PROTECTED] wrote: On Monday, 21 November 2005 at 15:11:35 +0100, martinko wrote: On Mon, 21 Nov 2005 10:17:01 +0800, Foo Ji-Haw wrote i wonder why i cannot start for instance ssh with /etc/rc.d/sshd start but i always have to use /etc/rc.d/sshd forcestart and similarly for stop, status, etc. any ideas pls ?? You have to add a line in /etc/rc.conf. I think it is samba_enable=YES. well, if you add sshd_enable=YES, the service (always) starts on boot. i just want to start it manually and i wonder why it doesn't listen to start argument but only forcestart and similarly for other commands i've got to use force. anyone knows why pls ?? martin Because when the system boots up it sends the 'start' argument to all the scripts in the rc.d directories, those scripts then check wether they should start or not. Force start simply overrides that check. Halldor Then something's broken, no? If the service isnt running and you send it a start and it doesnt start, then that's bad. You shouldnt need to override some checks, it should do what it's commanded to do. Nothing is broken, the script IS doing what it's commanded to do. rc.d scripts are intended to start service at boot time. The ability to start them arbitrarily is a convenience feature. When the system boots it sends ALL of the scripts in the rc.d directory the start command. The scripts are designed to check rc.conf and if they are not enabled in rc.conf, then they do not run (making service management as easy as editing one config file). forcestart is a convenience command to temporarily enable a service without making it run every time you boot the os. By using it, you are saying Even though I said DO NOT RUN service x, force service x to run. HTH, Micah ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: starting services?
Michael Beattie wrote: On 11/21/05, Halldor R. Haflidason [EMAIL PROTECTED] wrote: On Monday, 21 November 2005 at 15:11:35 +0100, martinko wrote: On Mon, 21 Nov 2005 10:17:01 +0800, Foo Ji-Haw wrote i wonder why i cannot start for instance ssh with /etc/rc.d/sshd start but i always have to use /etc/rc.d/sshd forcestart and similarly for stop, status, etc. any ideas pls ?? You have to add a line in /etc/rc.conf. I think it is samba_enable=YES. well, if you add sshd_enable=YES, the service (always) starts on boot. i just want to start it manually and i wonder why it doesn't listen to start argument but only forcestart and similarly for other commands i've got to use force. anyone knows why pls ?? martin Because when the system boots up it sends the 'start' argument to all the scripts in the rc.d directories, those scripts then check wether they should start or not. Force start simply overrides that check. Halldor Then something's broken, no? If the service isnt running and you send it a start and it doesnt start, then that's bad. You shouldnt need to override some checks, it should do what it's commanded to do. If you're talking about implementation no, it's not. In order to start a service with start argument it needs to be enabled in /etc/rc.conf. It's nicely documented in various places like man 8 rc or /etc/rc.subr. What OP is looking for is 'onestart' and 'onestop' parameters. I was looking for a solution to the same issue some days ago and found that in /etc/rc.subr: # If argument has a given prefix, then change the operation as follows: # Prefix Operation # -- - # fastSkip the pid check, and set rc_fast=yes # force Set ${rcvar} to YES, and set rc_force=yes # one Set ${rcvar} to YES Basically /etc/rc.d/sshd onestart will let you run sshd service without enabling it in rc.conf (which also means it'll start at boot time) yet it checks if sshd is not running already. Hope that helps, Karol -- Karol Kwiatkowski freebsd at orchid dot homeunix dot org signature.asc Description: OpenPGP digital signature
Re: starting services?
On Mon, 21 Nov 2005 14:22:19 +, Halldor R. Haflidason wrote On Monday, 21 November 2005 at 15:11:35 +0100, martinko wrote: On Mon, 21 Nov 2005 10:17:01 +0800, Foo Ji-Haw wrote i wonder why i cannot start for instance ssh with /etc/rc.d/sshd start but i always have to use /etc/rc.d/sshd forcestart and similarly for stop, status, etc. any ideas pls ?? You have to add a line in /etc/rc.conf. I think it is samba_enable=YES. well, if you add sshd_enable=YES, the service (always) starts on boot. i just want to start it manually and i wonder why it doesn't listen to start argument but only forcestart and similarly for other commands i've got to use force. anyone knows why pls ?? martin Because when the system boots up it sends the 'start' argument to all the scripts in the rc.d directories, those scripts then check wether they should start or not. Force start simply overrides that check. Halldor ok, i see now, thanks for your explanation! m. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: starting services?
On 11/17/05, Gerry Freymann [EMAIL PROTECTED] wrote: If you manually want to do this, you *must* use the full path to the script: /usr/local/etc/rc.d/samba.sh start | stop In the rc(8) manpage, it states that .sh scripts are sourced directly. 4. Call each script in turn using run_rc_script() (from rc.subr(8)), which sets $1 to ``start'', and sources the script in a subshell. If the script has a .sh suffix then it is sourced directly into the current shell. Why is that? I've found that running apache.sh directly with start|stop doesn't work. I need to run apachectl. Mike -- Michael P. Soulier [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: starting services?
On Mon, 21 Nov 2005 11:32:29 -0500 Michael P. Soulier [EMAIL PROTECTED] wrote: On 11/17/05, Gerry Freymann [EMAIL PROTECTED] wrote: If you manually want to do this, you *must* use the full path to the script: /usr/local/etc/rc.d/samba.sh start | stop In the rc(8) manpage, it states that .sh scripts are sourced directly. 4. Call each script in turn using run_rc_script() (from rc.subr(8)), which sets $1 to ``start'', and sources the script in a subshell. If the script has a .sh suffix then it is sourced directly into the current shell. Why is that? I've found that running apache.sh directly with start|stop doesn't work. I need to run apachectl. In order to manually call up apache.sh in the /usr/local/etc/rc.d directory, you have to use the full path to the script. If you: cd /usr/local/etc/rc.d ./apache.sh start it should complain and error out. but if you did: /usr/local/etc/rc.d/apache.sh start things should go as planned. That's, at least, if you wanna do it manually (to either stop or start a service that has a shell script in there). -gerry ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: starting services?
On Monday, November 21, 2005 1:08:19 PM, Gerry Freymann [EMAIL PROTECTED] Subject: Re: starting services? Wrote these words of wisdom: On Mon, 21 Nov 2005 11:32:29 -0500 Michael P. Soulier [EMAIL PROTECTED] wrote: On 11/17/05, Gerry Freymann [EMAIL PROTECTED] wrote: If you manually want to do this, you *must* use the full path to the script: /usr/local/etc/rc.d/samba.sh start | stop In the rc(8) manpage, it states that .sh scripts are sourced directly. 4. Call each script in turn using run_rc_script() (from rc.subr(8)), which sets $1 to ``start'', and sources the script in a subshell. If the script has a .sh suffix then it is sourced directly into the current shell. Why is that? I've found that running apache.sh directly with start|stop doesn't work. I need to run apachectl. In order to manually call up apache.sh in the /usr/local/etc/rc.d directory, you have to use the full path to the script. If you: cd /usr/local/etc/rc.d ./apache.sh start it should complain and error out. but if you did: /usr/local/etc/rc.d/apache.sh start things should go as planned. That's, at least, if you wanna do it manually (to either stop or start a service that has a shell script in there). -gerry * REPLY SEPARATOR * On 10/11/2005 5:29:42 PM, Gerard Replied: I have apache2 installed and have no problem with: ./apache2.sh start Obviously, I have to run it as root. -- Gerard Seibert [EMAIL PROTECTED] I'm not afraid of flying...I'm afraid of being at 35,000 feet and suddenly *not* flying. Koren ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: starting services?
On 11/21/05, Gerry Freymann [EMAIL PROTECTED] wrote: but if you did: /usr/local/etc/rc.d/apache.sh start things should go as planned. That's odd. Why's that? Why should the script care? Mike -- Michael P. Soulier [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: starting services?
On 11/21/05, Michael P. Soulier [EMAIL PROTECTED] wrote: On 11/21/05, Gerry Freymann [EMAIL PROTECTED] wrote: but if you did: /usr/local/etc/rc.d/apache.sh start things should go as planned. That's odd. Why's that? Why should the script care? Mike It uses part of the command line to determine where it's run form. That way it knows to look at like /etc or /usr/local/etc for configuration as well as other things. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: starting services?
Gerry Freymann wrote: On Thu, 17 Nov 2005 08:45:14 -0500 Lonnie Cumberland [EMAIL PROTECTED] wrote: I have just installed the Samba3 via the packages in the /stand/sysinstall but am not clear on how to start the daemon. I have had a lot of experience with Linux but have not learned a lot about FreeBSD yet and am working on it. Welcome to FreeBSD. You didn't mention what version you are using, so I can only speak definitively on v4. If you installed via the ports/packages, it should have dropped a start up script in /usr/local/etc/rc.d (which is where a lot of the start up/shut down scripts go for various programs). You may have something in there called samba.sh.sample. If you copy it or rename it to samba.sh it will automatically start and stop samba for you as needed. If you manually want to do this, you *must* use the full path to the script: /usr/local/etc/rc.d/samba.sh start | stop You should find what you need in /usr/local/etc/rc.d i wonder why i cannot start for instance ssh with /etc/rc.d/sshd start but i always have to use /etc/rc.d/sshd forcestart and similarly for stop, status, etc. any ideas pls ?? cheers, martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re[2]: starting services?
On Friday, November 18, 2005 3:15:25 PM, martinko [EMAIL PROTECTED] Subject: Re: starting services? Wrote these words of wisdom: Gerry Freymann wrote: On Thu, 17 Nov 2005 08:45:14 -0500 Lonnie Cumberland [EMAIL PROTECTED] wrote: I have just installed the Samba3 via the packages in the /stand/sysinstall but am not clear on how to start the daemon. I have had a lot of experience with Linux but have not learned a lot about FreeBSD yet and am working on it. Welcome to FreeBSD. You didn't mention what version you are using, so I can only speak definitively on v4. If you installed via the ports/packages, it should have dropped a start up script in /usr/local/etc/rc.d (which is where a lot of the start up/shut down scripts go for various programs). You may have something in there called samba.sh.sample. If you copy it or rename it to samba.sh it will automatically start and stop samba for you as needed. If you manually want to do this, you *must* use the full path to the script: /usr/local/etc/rc.d/samba.sh start | stop You should find what you need in /usr/local/etc/rc.d i wonder why i cannot start for instance ssh with /etc/rc.d/sshd start but i always have to use /etc/rc.d/sshd forcestart and similarly for stop, status, etc. any ideas pls ?? cheers, martin * REPLY SEPARATOR * On 10/11/2005 5:29:42 PM, Gerard Replied: You need the following directives in the /etc/rc.conf file. samba_enable=YES sshd_enable=YES Now, reboot the machine and both services should start up. You will see a message displayed as they are started. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
starting services?
Greetings All, I hope that you are all doing well today. I have just installed the Samba3 via the packages in the /stand/sysinstall but am not clear on how to start the daemon. I have had a lot of experience with Linux but have not learned a lot about FreeBSD yet and am working on it. Also, I have been watching the threads on some hackers breaking into someone's system through PHP and am wondering about how secure FreeBSD really is compared to various default installs of Linux. Not to start a comparison battle, but I just wanted to try to find out a little more about the basic security of FreeBSD as we are looking to use it in a production service. Thanks, -- Lonnie ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: starting services?
On Thu, 17 Nov 2005 08:45:14 -0500 Lonnie Cumberland [EMAIL PROTECTED] wrote: I have just installed the Samba3 via the packages in the /stand/sysinstall but am not clear on how to start the daemon. I have had a lot of experience with Linux but have not learned a lot about FreeBSD yet and am working on it. Welcome to FreeBSD. You didn't mention what version you are using, so I can only speak definitively on v4. If you installed via the ports/packages, it should have dropped a start up script in /usr/local/etc/rc.d (which is where a lot of the start up/shut down scripts go for various programs). You may have something in there called samba.sh.sample. If you copy it or rename it to samba.sh it will automatically start and stop samba for you as needed. If you manually want to do this, you *must* use the full path to the script: /usr/local/etc/rc.d/samba.sh start | stop You should find what you need in /usr/local/etc/rc.d Also, I have been watching the threads on some hackers breaking into someone's system through PHP and am wondering about how secure FreeBSD really is compared to various default installs of Linux. That isn't a problem with FreeBSD, it's a problem with PHP (and/or poor programming). I would feel quite secure with FreeBSD and PHP. The latest exploits involved a few PHP scripts and were quickly patched. There are sections on securing FreeBSD in the handbook, and if you google you'll find a few other sites with suggestions and examples too. Have fun! -Gerry ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: starting services?
I have just installed the Samba3 via the packages in the /stand/sysinstall but am not clear on how to start the daemon. I have had a lot of experience with Linux but have not learned a lot about FreeBSD yet and am working on it. If Samba is all config'ed and ready to roll, I recall the startup command was simply: # /path/to/installation/smbd -D ...and the name service: # /path/to/installation/nmbd -D ...to run it in daemon mode. Also, I have been watching the threads on some hackers breaking into someone's system through PHP and am wondering about how secure FreeBSD really is compared to various default installs of Linux. Not to start a comparison battle, but I just wanted to try to find out a little more about the basic security of FreeBSD as we are looking to use it in a production service. That particular thread apparently was dealing with a breach through PHP. Since the inherent nature of a web server is to provide full access to everyone, it's an easy target to probe for vulns. IMHO, FreeBSD was not at fault here (at least not entirely). It really depends on the particular setup etc, etc ad-infinitum. I will not comment on Linux at all, because I've only touched it a couple times, but if you want scalable, reliable, dependable, rock-solid performance in production, I'd give FBSD a try for certain. No matter what system you run, unless it has no cables attached and is locked in a vault, there will always be the potential for a break-in. Steve ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: starting services?
--On Thursday, November 17, 2005 09:19:09 -0500 Gerry Freymann [EMAIL PROTECTED] wrote: On Thu, 17 Nov 2005 08:45:14 -0500 Lonnie Cumberland [EMAIL PROTECTED] wrote: I have just installed the Samba3 via the packages in the /stand/sysinstall but am not clear on how to start the daemon. I have had a lot of experience with Linux but have not learned a lot about FreeBSD yet and am working on it. Welcome to FreeBSD. You didn't mention what version you are using, so I can only speak definitively on v4. If you installed via the ports/packages, it should have dropped a start up script in /usr/local/etc/rc.d (which is where a lot of the start up/shut down scripts go for various programs). You may have something in there called samba.sh.sample. If you copy it or rename it to samba.sh it will automatically start and stop samba for you as needed. Most likely you are going to have to also edit /etc/rc.conf. Look at the script. If it contains instructions to edit /etc/rc.conf, follow them, or you won't be able to start the service. Usually, a startup script will use rc.subr, and it will require an entry in /etc/rc.conf like this; samba_enable=YES It may also require an entry for any additional flags that you want to use on startup and possibly for the location of the conf file, but all that should be noted in the startup script. Paul Schmehl ([EMAIL PROTECTED]) Adjunct Information Security Officer University of Texas at Dallas AVIEN Founding Member http://www.utdallas.edu/ir/security/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
rcNG - starting services.
I just made the transition to 5.3 from 4.x and I am unclear on the the new rcNG way of starting locally installed services such as MySQL, Samba etc. I did read the manual pages on rc.d and rcNG. I just installed MySQL from ports and would like it to start automatically on boot. The manual page for rcNG is a bit unclear for starting local userland services such as mysql. A working example for a common application such as MysQL, Postgresql, or Samba would certainly be useful. My question is: Do I still start MysQL the old way with the script in /usr/local/etc/rc.d/mysql-server.sh? OR Do I create an entry in /etc/rc.conf.local with mysql_enable=YES? Also, if using the rcNG method, do I have to copy the mysql-server.sh script to /etc/rc.d/mysql or will rcNG make use of default /usr/local/etc/rc.d/mysql-server.sh? Thanks, -- Scott A. Gerhardt, P.Geo. Gerhardt Information Technologies ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rcNG - starting services.
Hi Scott, Friday, December 3, 2004, 5:30:16 PM, you made these points: I just made the transition to 5.3 from 4.x and I am unclear on the the new rcNG way of starting locally installed services such as MySQL, Samba etc. I did read the manual pages on rc.d and rcNG. I just installed MySQL from ports and would like it to start automatically on boot. The manual page for rcNG is a bit unclear for starting local userland services such as mysql. A working example for a common application such as MysQL, Postgresql, or Samba would certainly be useful. My question is: Do I still start MysQL the old way with the script in /usr/local/etc/rc.d/mysql-server.sh? yes OR Do I create an entry in /etc/rc.conf.local with mysql_enable=YES? you need to add line mysql_enable=YES to rc.conf Also, if using the rcNG method, do I have to copy the mysql-server.sh script to /etc/rc.d/mysql or will rcNG make use of default no /usr/local/etc/rc.d/mysql-server.sh? yes ;-) -- Best Regards, +--==/\/\==--+ (__) FreeBSD | DanGer [EMAIL PROTECTED] |\\\'',) The | [EMAIL PROTECTED] ICQ261701668 | \/ \ ^Power | http://danger.homeunix.org | .\._/_)To +--==\/\/==--+ Serve [ Malpractice makes malperfect. ] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: order of starting services at boot?
Hello, Can anybody explain to me how FreeBSD 5.2.1 controls the start order of the scripts in /etc/rc.d ? I think it is just alphabetic order according to whatever sort order is in effect. jerry I've looked all over and am having trouble gleening what controls this. For instance, if I would like to start ipfw before dhclient (right now dhclient starts, then ipfw starts), how would I accomplish this? Thanks, Duane ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: order of starting services at boot?
Jerry McAllister [EMAIL PROTECTED] wrote: Hello, Can anybody explain to me how FreeBSD 5.2.1 controls the start order of the scripts in /etc/rc.d ? I think it is just alphabetic order according to whatever sort order is in effect. But that _is_ how 4.X and previous version did it. But I think it's changed in 5.x. 5.x has a some new stuff built into rcng which allows you to specify dependencies so that (for example) your database application doesn't start until the database server is up and running. I don't know the details of how it works yet. It's on my TODO list to take some time to research it and understand the new features available, but I haven't got to it yet. Rhodes has apparently been busy, though, since there is a new section in the handbook on rcng: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-rcng.html -- Bill Moran Potential Technologies http://www.potentialtech.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: order of starting services at boot?
* Jerry McAllister [EMAIL PROTECTED] [0835 16:35]: Hello, Can anybody explain to me how FreeBSD 5.2.1 controls the start order of the scripts in /etc/rc.d ? I think it is just alphabetic order according to whatever sort order is in effect. uh, no, that'd suck. http://www.mewburn.net/luke/talks/auug-2003/ -- When we are planning for posterity, we ought to remember that virtue is not hereditary. -- Thomas Paine Rasputin :: Jack of All Trades - Master of Nuns ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: order of starting services at boot?
Jerry McAllister [EMAIL PROTECTED] wrote: Hello, Can anybody explain to me how FreeBSD 5.2.1 controls the start order of the scripts in /etc/rc.d ? I think it is just alphabetic order according to whatever sort order is in effect. But that _is_ how 4.X and previous version did it. But I think it's changed in 5.x. OH, I overlooked that he specified 5.2.1. Haven't worked on that yet. Sorry, jerry 5.x has a some new stuff built into rcng which allows you to specify dependencies so that (for example) your database application doesn't start until the database server is up and running. I don't know the details of how it works yet. It's on my TODO list to take some time to research it and understand the new features available, but I haven't got to it yet. Rhodes has apparently been busy, though, since there is a new section in the handbook on rcng: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-rcng.html -- Bill Moran Potential Technologies http://www.potentialtech.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
order of starting services at boot?
Hello, Can anybody explain to me how FreeBSD 5.2.1 controls the start order of the scripts in /etc/rc.d ? I've looked all over and am having trouble gleening what controls this. For instance, if I would like to start ipfw before dhclient (right now dhclient starts, then ipfw starts), how would I accomplish this? Thanks, Duane ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: order of starting services at boot?
Just number them like so: [EMAIL PROTECTED] ls -l /usr/local/etc/rc.d/ total 32 -r-xr-xr-x 1 root wheel 248 Oct 6 2003 010.pkgtools.sh -rwxr-x--x 1 root wheel 391 Jan 28 2004 020.xinetd.sh -r-xr-xr-x 1 root wheel 1720 May 31 10:17 030.svscan.sh -r-xr-xr-x 1 root wheel 646 Jul 3 12:03 040.apache.sh -rwxr-x--- 1 root wheel 549 Apr 17 11:23 050.mysql-server.sh -rwxr-x--- 1 root wheel 181 Apr 17 11:55 055.mysql-client.sh -r-xr-xr-x 1 root wheel 756 Jun 29 14:26 060.snmpd.sh lrwxr-xr-x 1 root wheel44 May 31 14:46 075.courier-imap-imapd-ssl.sh - /usr/local/libexec/courier-imap/imapd-ssl.rc lrwxr-xr-x 1 root wheel40 May 31 14:59 080.courier-imap-imapd.sh - /usr/local/libexec/courier-imap/imapd.rc -r-xr-xr-x 1 root wheel 1853 May 28 12:29 100.squid.sh -- James S. - Original Message - From: Duane Winner [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 5:09 PM Subject: order of starting services at boot? Hello, Can anybody explain to me how FreeBSD 5.2.1 controls the start order of the scripts in /etc/rc.d ? I've looked all over and am having trouble gleening what controls this. For instance, if I would like to start ipfw before dhclient (right now dhclient starts, then ipfw starts), how would I accomplish this? Thanks, Duane ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: order of starting services at boot?
In the last episode (Aug 10), Duane Winner said: Can anybody explain to me how FreeBSD 5.2.1 controls the start order of the scripts in /etc/rc.d ? I've looked all over and am having trouble gleening what controls this. The rc manpage explains rc.d/ and the magic keywords used inside its scripts. For instance, if I would like to start ipfw before dhclient (right now dhclient starts, then ipfw starts), how would I accomplish this? Add ipfw to dhclient's REQUIRE line. This change was made to -current, so when 5.3 ships it'll already do what you want :) -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: order of starting services at boot?
Yeah. I guess that ipfw isn't started like that. Durr. I didn't reallt read the original post. -- James S. - Original Message - From: Dan Nelson [EMAIL PROTECTED] To: Duane Winner [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 6:30 PM Subject: Re: order of starting services at boot? In the last episode (Aug 10), Duane Winner said: Can anybody explain to me how FreeBSD 5.2.1 controls the start order of the scripts in /etc/rc.d ? I've looked all over and am having trouble gleening what controls this. The rc manpage explains rc.d/ and the magic keywords used inside its scripts. For instance, if I would like to start ipfw before dhclient (right now dhclient starts, then ipfw starts), how would I accomplish this? Add ipfw to dhclient's REQUIRE line. This change was made to -current, so when 5.3 ships it'll already do what you want :) -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: order of starting services at boot?
Dan Nelson wrote: In the last episode (Aug 10), Duane Winner said: Can anybody explain to me how FreeBSD 5.2.1 controls the start order of the scripts in /etc/rc.d ? I've looked all over and am having trouble gleening what controls this. The rc manpage explains rc.d/ and the magic keywords used inside its scripts. Ugh. I kept seeing that but kept thinking I was misunderstanding since the lines began with '#' and couldn't get over thinking they were comments only. Thanks. For instance, if I would like to start ipfw before dhclient (right now dhclient starts, then ipfw starts), how would I accomplish this? Add ipfw to dhclient's REQUIRE line. This change was made to -current, so when 5.3 ships it'll already do what you want :) That's good news. So, I take it then I'm not some sort of freak for wanting to do this? :) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]