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]