* Re: [gentoo-dev] Caching service dependencies ...
2002-01-20 8:45 ` Martin Schlemmer
@ 2002-01-20 19:35 ` Kevin Gordon
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Gordon @ 2002-01-20 19:35 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 2616 bytes --]
Thanks Martin. Results:
# grep -r "rc.d/config" /etc/init.d/*
/etc/init.d/postgresql:#. /etc/rc.d/config/functions
/etc/init.d/postgresql.backup:. /etc/rc.d/config/functions
/etc/init.d/serial: if [ -e /etc/rc.d/config/serial ]
/etc/init.d/serial: . /etc/rc.d/config/serial
In /etc/init.d
I removed postgresql.backup
renamed postgresql to postgresql.sh
but still getting error below.
In /etc/rc.d/config/functions
I now have postgresql ???? and pgsql ????. The postgresql file is not a
copy of my modified startup script. The pgsql (the normal name used in
standard postgresql install) I cant believe its there as my current gentoo
is a totally new install.
Is there also a problem with serial?
What was I doing in before the depscan.sh problem?
I found the config part of the postgresql ebuild not automatically running.
As per earlier emails I ran:
# ebuild postgresql-7.1.3.ebuild config (failed /usr/bin/initab:
/tmp/initdb.28959: Permission denied)
# chmod 777 /tmp (I will change this to 1777)
# rm -R /var/db/postgresql
# ebuild postgresql-7.1.3.ebuild config (config ok)
But I then could not find a startup script so I copied one from an earlier
version of gentoo and started to modify it.
Are there some notes to guide me?
Many thanks Martin
Regards,
Kevin
----- Original Message -----
From: "Martin Schlemmer" <azarah@gentoo.org>
To: "Gentoo-Dev" <gentoo-dev@gentoo.org>
Sent: Sunday, January 20, 2002 9:45 PM
Subject: Re: [gentoo-dev] Caching service dependencies ...
On Sun, 2002-01-20 at 00:16, Kevin Gordon wrote:
> Further to my email subject "postgresql" I was working on a start stop
> script for postgresql and I seem to have corrupted:
>
> Caching service dependencies ...
> /etc/init.d/depscan.sh: root: command not found
> /etc/init.d/depscan.sh: The: command not found
> ....................................................................
> information: No such file or directory
> on : No such file or directory
> ........................................................
> server. : No such file or directory
> /etc/init.d/depscan.sh: /etc/rc.d/config/functions: No such file or
> directory
>
This is most probibly causes by a broken rc-script in
/etc/init.d/ . If you have some odd script there, rename it
to myscript.sh, otherwise depscan.sh is going to see it as
an rc-script.
Also do the following to find the offending script:
grep -r "rc.d/config" /etc/init.d/*
Let us know if an ebuild installed it, as we may have missed
it.
--
Martin Schlemmer
Gentoo Linux Developer, Desktop Team Developer
Cape Town, South Africa
[-- Attachment #2: postgresql.sh --]
[-- Type: application/octet-stream, Size: 1878 bytes --]
#!/sbin/runscript
##RCUPDATE:3 4 5:98: Required for rc-update
# Proper init scripts on Linux systems normally require setting lock
# and pid files under /var/run as well as reacting to network
# settings, so you should treat this with care.
# Original author: Ryan Kirkpatrick <pgsql@rkirkpat.net>
# $Header: /home/projects/pgsql/cvsroot/pgsql/contrib/start-scripts/linux,v 1.1 2001/02/08 19:53:33 petere Exp $
# Installation prefix
#prefix=/usr/local/pgsql
prefix=/usr
# Data directory
PGDATA="/var/db/postgresql/data"
# Who to run pg_ctl as, should be "postgres".
PGUSER=postgres
# Where to keep a log file
PGLOG="$PGDATA/serverlog"
export PGDATA
# 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"
set -e
# Only start if we can find pg_ctl.
test -f $DAEMON || exit 0
#. /etc/rc.d/config/functions
SERVICE="Postgresql Database"
opts="start stop restart"
basedir=/usr
bindir=/usr/sbin
mode=$1
# Safeguard (relative paths, core dumps..)
cd $basedir
start() {
# Start daemon
if test -x $DAEMON
then
ebegin "Starting $SERVICE..."
su - $PGUSER -c "$DAEMON start -s -l $PGLOG -D $PGDATA"
eend $? "Error starting $SERVICE"
else
echo "Can't execute $DAEMON"
fi
}
stop () {
ebegin "Killing $SERVICE"
su - $PGUSER -c "$DAEMON stop -s -m fast -D $PGDATA"
eend $? "Error stopping $SERVICE"
}
restart () {
ebegin "Restarting $SERVICE"
su - $PGUSER -c "$DAEMON restart -s -m fast -D $PGDATA"
eend $? "Error restarting $SERVICE"
}
status () {
ebegin "Restarting $SERVICE"
su - $PGUSER -c "$DAEMON status -D $PGDATA"
eend $? "Error restarting $SERVICE"
}
#doservice ${@}
^ permalink raw reply [flat|nested] 3+ messages in thread