fbsd 6.1 and starting services problem
zz_11 at mail.bg
zz_11 at mail.bg
Tue Jul 25 05:56:10 UTC 2006
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
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
# PostgreSQL boot time startup script for FreeBSD. Copy
this file to
# Created through merger of the Linux start script by Ryan
# and the script in the FreeBSD ports collection.
2001/04/19 19:17:44 petere Exp $
## EDIT FROM HERE
# PROVIDE: postgresql
# Installation prefix
# Data directory
# Who to run pg_ctl as, should be "postgres".
# Where to keep a log file
## STOP EDITING HERE
# The path that is to be used for the script
# What to use to start up the postmaster
test -x "$DAEMON" || exit 0
case $1 in
su -l $PGUSER -c "$DAEMON start -D '$PGDATA' -s -l
echo -n ' postgresql'
su -l $PGUSER -c "$DAEMON stop -D '$PGDATA' -s -m
su -l $PGUSER -c "$DAEMON restart -D '$PGDATA' -s -m
su -l $PGUSER -c "$DAEMON status -D '$PGDATA'"
# Print help
echo "Usage: Basename $0
Цитат на писмо от Lowell Gilbert
<freebsd-questions-local at be-well.ilk.org>:
> zz_11 at mail.bg 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
> > 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
> > in /usr/local/etc/rc.d .
> Did you remember to use mergemaster(8) to update your
> /etc scripts?
Изработване на сайт по Ваше желание за 300лв.
More information about the freebsd-questions